Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-05-20 20:46:31


At 06:44 AM 5/20/2003, Robin Hu wrote:

> I once mentioned boost::timer behaviors different in different
> platform in this maillist, and Beman said that's the problem of
> microsoft himself, because it's he who failed to conform to the
> standard. (Hi Beman, am I right? ).

Yep, the C standard says "The clock function returns the implementation's
best approximation to the processor time used by the program..."

I wouldn't say wall-clock time (as returned by Windows C libraries) is the
"best approximation", since the platform does support processor time
functions.

> But I think such measurement is used so often, that we shouldnt leave
> this problem alone. I'd prefer to refine timer to process_timer and
> walltime_timer, and each behaviors the same on different platforms.

I agree with you that we should really have separate timers for processing
time and wall-clock time.

But I would also like to nail down some of the other specifications. As
Toon points out, the behavior of clock() as regards wraparound is really
not reliable.

> Here's my simple implementation of new timers, which should work on
> both linux and windows nt. I hope you'll intested in this idea and
> give some comments. Thanks.

Let's look more seriously at the Boost Date-Time library first. I don't
want to make any changes to Boost timer without first understanding the
pros and cons of basing timers on Date-Time.

Do keep pestering me if there isn't more progress on these issues in the
next week or two!

Thanks,

--Beman


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