Skip to content

getCPUTime on x86_64 Mac OS X 10.6

I have GHC 6.10.4 installed on a recent Mac Mini, which is running a 32-bit kernel (Snow Leopard, 10.6) but has 64-bit GHC installed, using MacPorts. I've compiled a very large commercial product with this installation (with FFI etc) and the product's testsuite passes, so I'm fairly confident that GHC is working ... except that "getCPUTime" is giving bogus values.

This simple program:

import CPUTime
fn = do t <- getCPUTime
        putStrLn ("t = " ++ show t)
        fn
main :: IO ()
main = fn

ought to produce increasing values of "t". However, the output jumps around wildly, from 10^22^, to 10^24^, to 10^15^.

Trac metadata
Trac field Value
Version 6.10.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information