[Haskell-cafe] getCPUTime ??

2005-11-21 Thread Michael Benfield
I'm new to Haskell. I'm apparently misunderstanding something here. When I run this program: - module Main where import System.Posix import System.CPUTime printTime = getCPUTime = putStrLn . show main = printTime sleep 5 printTime - It produces this output: 14300

Re: [Haskell-cafe] getCPUTime ??

2005-11-21 Thread Jon Fairbairn
On 2005-11-21 at 15:14EST Michael Benfield wrote: I'm new to Haskell. I'm apparently misunderstanding something here. When I run this program: - module Main where import System.Posix import System.CPUTime printTime = getCPUTime = putStrLn . show main = printTime sleep 5

Re: [Haskell-cafe] getCPUTime ??

2005-11-21 Thread Cale Gibbard
getCPUTime gets the amount of CPU time used by the program so far, in picoseconds (though with limited resolution). Use getClockTime from System.Time to get the current clock time. - Cale On 21/11/05, Michael Benfield [EMAIL PROTECTED] wrote: I'm new to Haskell. I'm apparently misunderstanding

Re: [Haskell-cafe] getCPUTime ??

2005-11-21 Thread Duncan Coutts
On Mon, 2005-11-21 at 15:14 -0500, Michael Benfield wrote: I'm new to Haskell. I'm apparently misunderstanding something here. When I run this program: - module Main where import System.Posix import System.CPUTime printTime = getCPUTime = putStrLn . show main = printTime