mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 14:33:41 +00:00
runtime: merge common sleep() functions
This commit is contained in:
@@ -91,11 +91,6 @@ func putchar(c byte) {
|
||||
nrf.UART0.EVENTS_TXDRDY = 0
|
||||
}
|
||||
|
||||
//go:linkname sleep time.Sleep
|
||||
func sleep(d timeUnit) {
|
||||
sleepTicks(d / tickMicros)
|
||||
}
|
||||
|
||||
func sleepTicks(d timeUnit) {
|
||||
for d != 0 {
|
||||
ticks() // update timestamp
|
||||
|
||||
Reference in New Issue
Block a user