From 5b5bd57348327c0c380a99d8c6438d7bbc012797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0irhoe=20Biazhkovi=C4=8D?= Date: Wed, 16 Nov 2022 20:04:02 +0300 Subject: [PATCH] (minor) self call to NowUnixNano in TimeCache for Now --- pkg/timecache/timecache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/timecache/timecache.go b/pkg/timecache/timecache.go index dbabeef..d7050fb 100644 --- a/pkg/timecache/timecache.go +++ b/pkg/timecache/timecache.go @@ -71,7 +71,7 @@ func (t *TimeCache) Stop() { // Now returns the cached time as a time.Time value. func (t *TimeCache) Now() time.Time { - return time.Unix(0, t.clock.Load()) + return time.Unix(0, t.NowUnixNano()) } // NowUnixNano returns the cached time as nanoseconds since the Unix Epoch.