Boost logo

Boost :

Subject: Re: [boost] [Chrono] Proposed library now feature complete
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2008-11-24 03:49:09


Beman Dawes wrote:

[snip]

>
> I'm wondering if there are really two separate needs; a high-precision
> low-overhead timer that may give incorrect results if not used
> carefully, and an always reliable timer that has more internal
> overhead and may have lower precision.

Yes. Having only millisecond resolution would be way too limiting. I'd
rather use a QPC-based implementation until I actually got myself into
problems (or had very specific requirements).

>
>> In the past I have chosen to use timeGetTime with timeBeginPeriod(1)
>> for high resolution timers to avoid these issues.
>
> I wasn't aware of that API. I'll take a look.

IIRC, timeBeginPeriod does not affect the update of the system time (as
reported by e.g. GetSystemTime). Shouldn't be a problem in this case, but
figured it might be worth mentioning.

/ Johan


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