Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2004-07-25 21:11:20


On Mon, 26 Jul 2004 11:43:55 +1000, Matt Hurd wrote
> On Sat, 24 Jul 2004 11:24:39 +0100, John Maddock
> <john_at_[hidden]> wrote:
> > Just out of interest, what is the problem that prevents the date-time
> > library from implementing a microsecond clock using GetSystemTimeAsFileTime
> > on Win32?
> >
> > Thanks,
> >
> > John.
>
> The resolution supplied by GetSystemTimeAsFileTime may not be what
> you think. I get 10 milliseconds resolution out of my machine from the
> following code.

Yes, this is a problem -- but at least it is subsecond resolution which is
better than the second level resolution of the other clock type. So 'high
resolution clock' probably would be a better name with caveats by platform.
BTW, part of the test is to ensure that the clock values monotonically
increase with repeated sampling...

Jeff


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