From ce05e028144b790d2b52379237a4eda9407a968c Mon Sep 17 00:00:00 2001 From: siddharth Date: Sat, 16 Oct 2021 14:41:07 -0400 Subject: lib: add Sleep --- lib/time.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/time.go b/lib/time.go index dbeb843..44bc0d9 100644 --- a/lib/time.go +++ b/lib/time.go @@ -9,3 +9,8 @@ import "time" func SleepRandom(min, max time.Duration) { time.Sleep(time.Duration(RandomInt(int64(min), int64(max)))) } + +// Sleep for `d` nano seconds. +func Sleep(d time.Duration) { + time.Sleep(d) +} -- cgit v1.2.3