소스 검색

Simpler constructor

Richard Crowley 10 년 전
부모
커밋
49469ac48f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      sample.go

+ 1 - 1
sample.go

@@ -55,7 +55,7 @@ func NewExpDecaySample(reservoirSize int, alpha float64) Sample {
 		t0:            time.Now(),
 		values:        newExpDecaySampleHeap(reservoirSize),
 	}
-	s.t1 = time.Now().Add(rescaleThreshold)
+	s.t1 = s.t0.Add(rescaleThreshold)
 	return s
 }