cpuTimePrecision wrong on Windows?

J. Garrett Morris trevion at gmail.com
Thu Feb 21 03:32:41 EST 2008

Both numbers seem odd to me.

As far as I can tell, GHC uses GetProcessTimes to implement
getCPUTime.  GetProcessTimes returns counts of 100s of nanoseconds,
which isn't the number GHC uses for cpuTimePrecision, but I can't find
anyplace in the API documentation that Microsoft actually guarantees
any non-hardware dependent timing precision.


On Wed, Feb 20, 2008 at 2:46 AM, Adrian Hey <ahey at iee.org> wrote:
> Adrian Hey wrote:
>  >  At least getCPUTime always seems to
>  > return a multiple of 125000000 (1/8 of cpuTimePrecision).
>  Actually, that's wrong. A little more intelligent experimentation
>  reveals that (on my system at least) getCPUTime always returns
>  a multiple of 15625000000 (cpuTimePrecision = 15.625 mS IOW).
>  It's still not the same as the figure exported by System.CPUTime
>  though :-(
>  Regards
>  --
>  Adrian Hey
>  _______________________________________________
>  Libraries mailing list
>  Libraries at haskell.org
>  http://www.haskell.org/mailman/listinfo/libraries

The man who'd introduced them didn't much like either of them, though
he acted as if he did, anxious as he was to preserve good relations at
all times. One never knew, after all, now did one now did one now did

More information about the Libraries mailing list