summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/libposix/posix008.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/lib/libposix/posix008.hs')
-rw-r--r--testsuite/tests/lib/libposix/posix008.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/lib/libposix/posix008.hs b/testsuite/tests/lib/libposix/posix008.hs
new file mode 100644
index 0000000000..249e58eedc
--- /dev/null
+++ b/testsuite/tests/lib/libposix/posix008.hs
@@ -0,0 +1,12 @@
+import Posix
+
+main =
+ installHandler realTimeAlarm (Catch alarmclock) Nothing >>
+ putStr "Scheduling an alarm in 5 seconds...\n" >>
+ scheduleAlarm 5 >>
+ putStr "Sleeping one minute.\n" >>
+ sleep 60 >>
+ putStr "How did I get here?\n"
+
+alarmclock =
+ putStr "The alarm went off.\n"