getCPUTime does not work in general
With
fromPicoSeconds picoseconds =
let (n,k) = divMod picoseconds (10^12)
in normalizeTimeDiff (diffClockTimes (TOD n k) (TOD 0 0))
Then evaluate the following:
replicateM 1000 $ liftM fromPicoSeconds getCPUTime
They all return the same number of picoseconds. Computers aren't that fast. I expected to see at least some different numbers.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |