
24 Jan
2007
24 Jan
'07
2:09 a.m.
On Tue, Jan 23, 2007 at 04:10:10PM -0800, Bryan O'Sullivan wrote:
John Meacham wrote:
I would think this would be how the haskell 98 standard library CPUTime is implemented, is it not?
No. System.CPUTime gives you an approximate idea of the amount of CPU time your process, and all its threads, have used. The rdtsc instruction gives you a snapshot of the current CPU's cycle counter, regardless of who (if anyone) has been burning those cycles.
ah, of course. I made the same mistake before. carry on. :) the linux kernel source has readtsc equivalants for a bunch of different architectures, a simple CPP switch would allow support for most everything. John -- John Meacham - ⑆repetae.net⑆john⑈