mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 12:33:42 +00:00
Add runtime support for the nRF52
This commit is contained in:
@@ -3,18 +3,10 @@ package runtime
|
||||
|
||||
// TODO: use the time package for this.
|
||||
|
||||
// #include <unistd.h>
|
||||
import "C"
|
||||
|
||||
type Duration uint64
|
||||
|
||||
// Use microseconds as the smallest time unit
|
||||
const (
|
||||
Microsecond = 1
|
||||
Millisecond = Microsecond * 1000
|
||||
Second = Millisecond * 1000
|
||||
)
|
||||
|
||||
func Sleep(d Duration) {
|
||||
C.usleep(C.useconds_t(d))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user