summaryrefslogtreecommitdiff
path: root/ghc/misc/examples/posix/po006/Main.hs
blob: 8008a50f2b6763caa7aefb93f6165d0071091eeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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'