summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/sleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/sleep.c')
-rw-r--r--otherlibs/unix/sleep.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/otherlibs/unix/sleep.c b/otherlibs/unix/sleep.c
new file mode 100644
index 000000000..6abc80edf
--- /dev/null
+++ b/otherlibs/unix/sleep.c
@@ -0,0 +1,11 @@
+#include <mlvalues.h>
+#include "unix.h"
+
+value unix_sleep(t) /* ML */
+ value t;
+{
+ enter_blocking_section();
+ sleep(Int_val(t));
+ leave_blocking_section();
+ return Val_unit;
+}