diff options
author | Ayke van Laethem <[email protected]> | 2018-09-15 01:08:31 +0200 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2018-09-15 01:58:54 +0200 |
commit | 2a20c0c7f0c13c9b5c81422ea1c24ddd4eb765e7 (patch) | |
tree | 1375b629a1b845f9bd1f9f85bfe553e8e0b76d95 /src/runtime/time.go | |
parent | 1ac67cf8de41a74bb3998915b407856aa346511e (diff) | |
download | tinygo-2a20c0c7f0c13c9b5c81422ea1c24ddd4eb765e7.tar.gz tinygo-2a20c0c7f0c13c9b5c81422ea1c24ddd4eb765e7.zip |
all: rewrite sleep function
time.Sleep now compiles on all systems, so lets use that.
Additionally, do a few improvements in time unit handling for the
scheduler. This should lead to somewhat longer sleep durations without
wrapping (on some platforms).
Some examples got smaller, some got bigger. In particular, code using
the scheduler got bigger and the blinky1 example got smaller (especially
on Arduino: 380 -> 314 bytes).
Diffstat (limited to 'src/runtime/time.go')
-rw-r--r-- | src/runtime/time.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/runtime/time.go b/src/runtime/time.go deleted file mode 100644 index 3bdddaf31..000000000 --- a/src/runtime/time.go +++ /dev/null @@ -1,11 +0,0 @@ -package runtime - -// TODO: use the time package for this. - -type Duration uint64 - -// Use microseconds as the smallest time unit -const ( - Millisecond = Microsecond * 1000 - Second = Millisecond * 1000 -) |