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
-5
View File
@@ -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