diff options
author | siddharth <s@ricketyspace.net> | 2021-10-16 14:41:07 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2021-10-16 14:41:07 -0400 |
commit | ce05e028144b790d2b52379237a4eda9407a968c (patch) | |
tree | 0ff3fa90b0392fa95e4aa0ed8b829f935ab114cc /lib/time.go | |
parent | cc9a9dc2cdcca756b4cb8e926b9627912536c3a8 (diff) |
lib: add Sleep
Diffstat (limited to 'lib/time.go')
-rw-r--r-- | lib/time.go | 5 |
1 files changed, 5 insertions, 0 deletions
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) +} |