Skip to content

Commit 8582bed

Browse files
authored
fix: use TimestampFunc in busrt sampler (#671) (#672)
1 parent 7d9db06 commit 8582bed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sampler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (s *BurstSampler) Sample(lvl Level) bool {
8484
}
8585

8686
func (s *BurstSampler) inc() uint32 {
87-
now := time.Now().UnixNano()
87+
now := TimestampFunc().UnixNano()
8888
resetAt := atomic.LoadInt64(&s.resetAt)
8989
var c uint32
9090
if now > resetAt {

0 commit comments

Comments
 (0)