tons of new build options, fix mutex shit, etc
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import "time"
|
||||
|
||||
func sleepObfuscated(seconds int) {
|
||||
if seconds <= 0 {
|
||||
return
|
||||
}
|
||||
const slice = 500 * time.Millisecond
|
||||
end := time.Now().Add(time.Duration(seconds) * time.Second)
|
||||
for {
|
||||
remaining := time.Until(end)
|
||||
if remaining <= 0 {
|
||||
return
|
||||
}
|
||||
next := remaining
|
||||
if next > slice {
|
||||
next = slice
|
||||
}
|
||||
time.Sleep(next)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user