Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2004-05-06 08:46:28


On Thu, 06 May 2004 02:46:30 -0500, Aaron W. LaFramboise wrote
> I have prototype implementations for a few simple Windows clocks I
> have in mind in works. I'll post when I get a chance to finish something.

Great. BTW, did you see the earlier thread on the boost::timer? There are
some pointers to it on the Wiki in case you missed it:

http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?GDTL/Timer

> In the meantime, perhaps this might be interesting to someone. I
> wrote this two days ago to assess the capabilities of the clocks on
> Windows to determine what might be the most suitable as a time
> source. It outputs a combination of hardcoded information about the
> documented capabilities of clocks, plus information it has
> determined real-time about the capabilities of clocks from the OS.
> It should be standard C++ with documented Windows extensions. I
> tested on GCC, but it would probably work for any Windows compiler
> with little or no modifications. The rdtsc support will only work
> on GCC, though.
>
> Note that the implementation is very na´ve, and there are probably
> numerous flaws. Its the best I could come up with without wasting a
> whole lot of time. I am certainly interested in possible
> improvements. It takes about 30 seconds to run.
>
> On my platform (Windows XP Professional, GCC 3.3.2, MSVCRT runtime,
> Intel Pentium 4 1.4GHz), it has the following output. I don't have
> access to a whole lot of other machines presently, so if you have a
> Windows computer where these tests show interesting results, I would
> certainly be interested in privately seeing the output on your machine.

Very interesting. I'll play around with this. If the last 2 measurements are
correct they would very precise clocks for timing.

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net