This commit is contained in:
CaIon
2024-04-04 19:18:00 +08:00
parent 1cd1e54be4
commit c040fa229d
3 changed files with 11 additions and 1 deletions

View File

@@ -236,3 +236,8 @@ func StringToByteSlice(s string) []byte {
tmp2 := [3]uintptr{tmp1[0], tmp1[1], tmp1[1]}
return *(*[]byte)(unsafe.Pointer(&tmp2))
}
func RandomSleep() {
// Sleep for 0-3000 ms
time.Sleep(time.Duration(rand.Intn(3000)) * time.Millisecond)
}