cpuTimePrecision wrong on Windows?

Adrian Hey ahey at iee.org
Thu Feb 21 12:25:35 EST 2008


I wonder (if there's no set reliable figure for all platforms)
if it should be done empirically. Here's a naive way..

cpuTimePrecision = unsafePerformIO getCpuTimePrecision

getCpuTimePrecision =
  do t0 <- getCPUTime
     let wait = do t1 <- getCPUTime
                   if t1>t0 then return (t1-t0) else wait

But I guess you could do better than that with some more care and

Adrian Hey

More information about the Libraries mailing list