Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2000-04-08 05:59:48


>I am little confused by your approaches to measuring time. It seems that
your options are to use unprecise clock() or some exotic timers. I wrote
attached class some time ago for my own purposes, and it worked
It is a Win32 only implementation, but I am certain that similar
functionality can be found on UNIX platforms. All time is returned in
milliseconds elapsed since the timer was started.

My only comment is that GetProcessTimes is only available on NT (not Win9x
or CE), where as QueryPerformanceCounter is available on all Win32
platforms including Win9x and CE. Also QueryPerformanceCounter is the
"Microsoft recomended" method of performance monitoring (it has a lower
overhead/latency than GetProcessTimes) for example see "Developing
Optimized Code with Microsoft Visual C++ 6.0" on MSDN. Finally the
semantics of clock and QueryPerformanceCounter are the same - they both
measure the same kind of time under Win32 (what I would call elapsed system
time). In other words my intent was that the proposed changes would only
change the resolution of the timer used by the boost::timer class and
nothing else.

Having said all that, it is apparant that I've opened a can of worms here,
wasn't all this discussed before?

- John.

Boost list run by bdawes at, gregod at, cpdaniel at, john at