mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 22:43:40 +00:00
runtime: merge common sleep() functions
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user