Skip to content

Commit

Permalink
fix: use TimestampFunc in busrt sampler (#671) (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-pe committed May 1, 2024
1 parent 7d9db06 commit 8582bed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sampler.go
Expand Up @@ -84,7 +84,7 @@ func (s *BurstSampler) Sample(lvl Level) bool {
}

func (s *BurstSampler) inc() uint32 {
now := time.Now().UnixNano()
now := TimestampFunc().UnixNano()
resetAt := atomic.LoadInt64(&s.resetAt)
var c uint32
if now > resetAt {
Expand Down

0 comments on commit 8582bed

Please sign in to comment.