summaryrefslogtreecommitdiff
path: root/lib/std/syswrap-ss+freebsd.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-08-27 18:58:18 -0700
committerOri Bernstein <ori@eigenstate.org>2016-08-27 18:58:18 -0700
commita7d1902c56da54a4bc3891413bd3029c6ea7a7f9 (patch)
tree2c661cfd2555239afb73809d3829a239a9a01d20 /lib/std/syswrap-ss+freebsd.myr
parente83d16d5bd500b8e1913a836560f943a757ab86b (diff)
downloadmc-a7d1902c56da54a4bc3891413bd3029c6ea7a7f9.tar.gz
Add std.usleep() that uses std.time.
Diffstat (limited to 'lib/std/syswrap-ss+freebsd.myr')
-rw-r--r--lib/std/syswrap-ss+freebsd.myr6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/syswrap-ss+freebsd.myr b/lib/std/syswrap-ss+freebsd.myr
index 4818f5c..f445d17 100644
--- a/lib/std/syswrap-ss+freebsd.myr
+++ b/lib/std/syswrap-ss+freebsd.myr
@@ -6,7 +6,7 @@ use "slcp"
use "die"
pkg std =
- const nanosleep : (nsecs : time -> errno)
+ const nanosleep : (nsecs : uint64 -> errno)
$noret const exit : (status:int -> void)
pkglocal const bgetcwd : (buf : byte[:] -> errno)
@@ -16,8 +16,8 @@ const nanosleep = {nsecs
var req, rem
var s, ns
- s = (nsecs : uint64) / 1_000_000_000
- ns = (nsecs : uint64) % 1_000_000_000
+ s = nsecs / 1_000_000_000
+ ns = nsecs % 1_000_000_000
req = [.sec = s, .nsec = ns]
-> (sys.nanosleep(&req, &rem) : errno)