Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 1999-09-19 06:08:44


First of all, let me thank everyone who has taken the time to read and
comment on my regular expression proposals, I don't think that I would
dissagree with any of the comments, so I'll concentrate on some "proof of
principal" generics first and move on to the complex stuff later.

Now for the stupid question:

What exactly is the problem in implementing timer::elapsed_max() ?

Provided time_t is an integral type, then doesn't something like:

(double)numeric_limits<time_t>::max() / (double)CLOCKS_PER_SEC

give a reasonable value.

However from the standard it seems as if clock_t can be a floating point
type, in which case I accept estimation becomes more difficult, would:

numeric_limits<time_t>::max() - clock() / (double)CLOCKS_PER_SEC

give a reasonable estimation?

Finally, a member,

static double timer::elapsed_min();

would be a very useful addition, by default returns: (double)1/
(double)CLOCKS_PER_SEC

Thanks,

John.


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