[Haskell-cafe] Re: Computer time, independent of date
briqueabraque at yahoo.com
Fri Jan 9 15:32:14 EST 2009
>> Linux has High-Resolution Timers (HRTs) that may be appropriate. See
>> the manpage for clock_gettime(), which defines these HRTs:
>> CLOCK_MONOTONIC, in particular, looks suitable. Using it could be a
>> matter of just a few quick likes in FFI.
>> I don't know if Windows has similar features.
> and QueryPerformanceCounter, in detail.
Going from GetProcessTimes, which I found in ghc code
in libraries/base/System/CPUTime.hsc, I was just able
to find this in that same site:
Seems simpler. Since linux (and unix?) have clock_gettime
and windows has this GetTickCount, maybe it could be possible
to add getSystemCPUTime to System.CPUTime.
More information about the Haskell-Cafe