summaryrefslogtreecommitdiff
path: root/man/2/sys-sleep
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
commit46439007cf417cbd9ac8049bb4122c890097a0fa (patch)
tree6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /man/2/sys-sleep
parent37da2899f40661e3e9631e497da8dc59b971cbd0 (diff)
20060303-partial
Diffstat (limited to 'man/2/sys-sleep')
-rw-r--r--man/2/sys-sleep29
1 files changed, 29 insertions, 0 deletions
diff --git a/man/2/sys-sleep b/man/2/sys-sleep
new file mode 100644
index 00000000..d8b91a56
--- /dev/null
+++ b/man/2/sys-sleep
@@ -0,0 +1,29 @@
+.TH SYS-SLEEP 2
+.SH NAME
+sleep \- delay
+.SH SYNOPSIS
+.EX
+include "sys.m";
+sys := load Sys Sys->PATH;
+
+sleep: fn(period: int): int;
+.EE
+.SH DESCRIPTION
+.B Sleep
+suspends the current thread for
+.I period
+milliseconds.
+The actual suspension time may be a little more or less than
+the requested time.
+If
+.I period
+is 0, the process
+gives up the CPU if another process is waiting to run, returning
+immediately if not.
+.PP
+.B Sleep
+normally returns 0. In hosted Inferno it may return -1 to indicate that
+it was not possible to sleep (eg if no more threads are available).
+.SH SEE ALSO
+.IR sys-intro (2),
+.IR sys-millisec (2)