Ben writes:
> In Ghc, how do I sleep for say, 1 minute? I'm trying to write a simple file
> arrival listener and could not find the sleep api. Can haskell do it at
> all?
You can call system commands via System.system. On unix this ought to work.
I don't know if there is an equivalent to sleep on windows...
module Main where
import System (system)
import IO
main
= do hSetBuffering stdout NoBuffering
hPutStrLn stdout "I'm about to sleep"
exitCode <- system "sleep 60"
hPutStrLn stdout $ "slept with exit code: " ++ show exitCode
Cheers,
Bernie.
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell