summaryrefslogtreecommitdiffstats
path: root/lib/time.go
blob: dbeb843a4036fa9c5932274a54b9b92ef9793b66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
// Copyright © 2021 rsiddharth <s@ricketyspace.net>
// SPDX-License-Identifier: ISC

package lib

import "time"

// Sleeps for atleast `min` but not more than `max`.
func SleepRandom(min, max time.Duration) {
	time.Sleep(time.Duration(RandomInt(int64(min), int64(max))))
}