Boost logo

Boost :

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


Sergy,

>1) Do you want to measure process time or actual elaped time?

In theory I think that timer is supposed to measure process time (although
even that term is ambiguous in a multi-threaded environment - do you
process time or thread time?). This was discussed at some length about 12
months ago - check the egroups site for the old messages, I wasn't a member
then either, so maybe someone who was there can give us a resume of the
issues?

>2) Why you call it timer, not stopwatch?
> /* For me, timer is something more then a stop watch -- in
> mutithreaded env. one might need an object which can register
> multiple timeouts with callbacks (AKA as signals attached to
> slots) and that what I would call timer. */

Without some standard means of triggering events the point is moot, I
understand what you mean, but I've seen "timer" to describe both
stopwatches and event driven timers.

>I wrote StopWatch that measures elapsed time on Linux(it is less
>accurate on NT). It uses gettimeofday function (SVr4, BSD). It is
>not a submittion -- not finished, wrong style, etc., It is just a
>suggestion how to get usec resolution on UNIX platforms.

It is becoming apparent that there are many different ways to achieve the
same ends, since Beman wrote timer with the intention that it could support
multiple back-end implementations, I'm coming round to the idea that we
should go down that route for enhancements to timer.cpp, rather than
changing the original source. That way the user can choose which
implementation they want based upon their own requirements, while keeping
the useful front end.

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk