summaryrefslogtreecommitdiff
path: root/lib/std/syswrap-ss+plan9.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/syswrap-ss+plan9.myr')
-rw-r--r--lib/std/syswrap-ss+plan9.myr9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/std/syswrap-ss+plan9.myr b/lib/std/syswrap-ss+plan9.myr
index 33c555a..17fac5b 100644
--- a/lib/std/syswrap-ss+plan9.myr
+++ b/lib/std/syswrap-ss+plan9.myr
@@ -1,13 +1,22 @@
use sys
+use "types"
use "errno"
use "cstrconv"
pkg std =
+ const nanosleep : (nsecs : time -> errno)
$noret const exit : (status : int -> void)
pkglocal const bgetcwd : (buf : byte[:] -> errno)
;;
+const nanosleep = {nsecs
+ if sys.sleep((nsecs/1_000_000 : uint32)) < 0
+ -> lasterr()
+ ;;
+ -> 0
+}
+
const bgetcwd = {buf
var fd