summaryrefslogtreecommitdiff
path: root/lib/std/syswrap-ss+freebsd.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-08-27 00:53:49 -0700
committerOri Bernstein <ori@eigenstate.org>2016-08-27 00:57:00 -0700
commit6121d28dc28103cb85b22fe404daaa8c441790b4 (patch)
tree21e07f303bd9a48558dfcca1e34e9a99c00fcffd /lib/std/syswrap-ss+freebsd.myr
parent4aafe28c24ab5d1439631278a122251c6afc77d4 (diff)
downloadmc-6121d28dc28103cb85b22fe404daaa8c441790b4.tar.gz
nanosleep should use std.time.
Make it so.
Diffstat (limited to 'lib/std/syswrap-ss+freebsd.myr')
-rw-r--r--lib/std/syswrap-ss+freebsd.myr7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/std/syswrap-ss+freebsd.myr b/lib/std/syswrap-ss+freebsd.myr
index 15928f4..4818f5c 100644
--- a/lib/std/syswrap-ss+freebsd.myr
+++ b/lib/std/syswrap-ss+freebsd.myr
@@ -1,11 +1,12 @@
use sys
+use "types"
use "errno"
use "cstrconv"
use "slcp"
use "die"
pkg std =
- const nanosleep : (nsecs : uint64 -> errno)
+ const nanosleep : (nsecs : time -> errno)
$noret const exit : (status:int -> void)
pkglocal const bgetcwd : (buf : byte[:] -> errno)
@@ -15,8 +16,8 @@ const nanosleep = {nsecs
var req, rem
var s, ns
- s = nsecs / 1_000_000_000
- ns = nsecs % 1_000_000_000
+ s = (nsecs : uint64) / 1_000_000_000
+ ns = (nsecs : uint64) % 1_000_000_000
req = [.sec = s, .nsec = ns]
-> (sys.nanosleep(&req, &rem) : errno)