[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / misc / examples / posix / po006 / Main.hs
diff --git a/ghc/misc/examples/posix/po006/Main.hs b/ghc/misc/examples/posix/po006/Main.hs
new file mode 100644 (file)
index 0000000..8008a50
--- /dev/null
@@ -0,0 +1,14 @@
+import LibPosix
+
+main = 
+    epochTime >>= \ start ->
+    sleep 5 >>
+    let timeleft = 0 in
+    epochTime >>= \ finish ->
+    putStr "Started: " >>
+    putText start >>
+    putStr "\nSlept: " >>
+    putText (5 - timeleft) >>
+    putStr "\nFinished: " >>
+    putText finish >>
+    putChar '\n'