Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 1999-07-01 14:48:18


At 11:37 AM 7/1/99 -0700, Reid Sweatman wrote:

>Just a minor cavil from someone who does most of his programming on
Wintel
>platforms: the C and system timer functions aren't very reliable,
because
>they're at the mercy of the time-share schemes (which are different
in every
>version of Windows), and don't return very reliable numbers. On
Pentium and
>better Intel processors, though, the Time-stamp instructions are
available,
>which directly read an _Int64 counter in the CPU that counts cycles
since
>start-up or reset. The only inaccuracies in using these
instructions are
>those associated with the function-call overhead, assuming you've
handled
>thread-locking and such correctly. Admittedly, this only works on a
subset
>of one brand of processor, but realistically it accounts for a large
chunk
>of market share. I'd rather see such a version of the
implementation layer
>for Pentium systems than one that uses the standard system calls.

I never doubted that a timer implementation based on <ctime> isn't
going to be very accurate on some platforms; the current
implementation can be viewed as the default when nothing better is
available. So please do contribute better implementations for
particular hardware and/or compilers. Here is your chance to get
your picture posted on the boost web site!

--Beman

------------------------------------------------------------------------

eGroups.com home: http://www.egroups.com/group/boost
http://www.egroups.com - Simplifying group communications


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