summaryrefslogtreecommitdiff
path: root/lib/std/syswrap-ss+freebsd.myr
diff options
context:
space:
mode:
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)