From 4c1d73dcbdb527ba40aad1355136a796bb0e4367 Mon Sep 17 00:00:00 2001 From: "kayos@tcp.direct" Date: Sun, 3 Oct 2021 05:06:48 -0700 Subject: [PATCH] add util.go --- util.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 util.go diff --git a/util.go b/util.go new file mode 100644 index 0000000..2f6678a --- /dev/null +++ b/util.go @@ -0,0 +1,11 @@ +package girc + +import ( + "math/rand" + "time" +) + +func randSleep() { + rand.Seed(time.Now().UnixNano()) + time.Sleep(time.Duration(rand.Intn(50)) * time.Millisecond) +}