runtime: merge common sleep() functions

This commit is contained in:
Ayke van Laethem
2018-09-22 01:40:04 +02:00
parent 7c16f6c904
commit 7517ac86e4
4 changed files with 7 additions and 17 deletions
+1 -6
View File
@@ -34,13 +34,8 @@ func putchar(c byte) {
_Cfunc_putchar(int(c))
}
//go:linkname sleep time.Sleep
func sleep(d int64) {
_Cfunc_usleep(uint(d) / 1000)
}
func sleepTicks(d timeUnit) {
sleep(int64(d))
_Cfunc_usleep(uint(d) / 1000)
}
// Return monotonic time in nanoseconds.