From be4bd2f1de61ce899169514bd69ebd39d9f8100d Mon Sep 17 00:00:00 2001 From: kgdev Date: Fri, 26 Feb 2016 18:30:30 +0800 Subject: [PATCH] Update gosnow.go --- gosnow.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gosnow.go b/gosnow.go index 0635780..15b470a 100644 --- a/gosnow.go +++ b/gosnow.go @@ -79,7 +79,8 @@ func timestamp() uint64 { func tilNextMillis(ts uint64) uint64 { i := timestamp() - for i < ts { + for i <= ts { + time.Sleep(100 * time.Microsecond) i = timestamp() } return i