From 8582bed24f021b174e2dfddbd2cfc72a8e39ccfd Mon Sep 17 00:00:00 2001 From: crazy-pe <168214728+crazy-pe@users.noreply.github.com> Date: Wed, 1 May 2024 04:19:37 +0200 Subject: [PATCH] fix: use `TimestampFunc` in busrt sampler (#671) (#672) --- sampler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sampler.go b/sampler.go index 1be98c4f..83ce2ed3 100644 --- a/sampler.go +++ b/sampler.go @@ -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 {