Add runtime support for the nRF52

This commit is contained in:
Ayke van Laethem
2018-04-25 20:06:08 +02:00
parent e80f06bc5e
commit 04fef19753
13 changed files with 113 additions and 22 deletions
-8
View File
@@ -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))
}