diff options
Diffstat (limited to 'testsuite/tests/lib/libposix/posix009.hs')
-rw-r--r-- | testsuite/tests/lib/libposix/posix009.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/lib/libposix/posix009.hs b/testsuite/tests/lib/libposix/posix009.hs new file mode 100644 index 0000000000..1f230f648c --- /dev/null +++ b/testsuite/tests/lib/libposix/posix009.hs @@ -0,0 +1,15 @@ +import Posix + +main = + putStr "Blocking real time alarms.\n" >> + blockSignals (addSignal realTimeAlarm emptySignalSet) >> + putStr "Scheduling an alarm in 2 seconds...\n" >> + scheduleAlarm 2 >> + putStr "Sleeping 5 seconds.\n" >> + sleep 5 >> + putStrLn "Woken up" >> + getPendingSignals >>= \ ints -> + putStr "Checking pending interrupts for RealTimeAlarm\n" >> + print (inSignalSet realTimeAlarm ints) >> + putChar '\n' + |