
On Fri, 14 Jul 2006 09:58:40 +0200, "Philippe Vaucher" <philippe.vaucher@gmail.com> wrote:
I guess the whole component has to go through a fast track review, at least
Hum, ok.
I restate that this was just a guess on my part. The point is, I'm under the impression this has grown a bit beyond the (arbitrary) limit under which we consider additions as sort of "patches" which can go into the code without discussion.
At a first glance there are a couple of points which perplex me, for
instance the auto_start/manual_start option.
Well it thought it was pretty obvious, if you want the timer to start immediatly when it is created of if you want to manually start it with tmr.start().
Yes, I understood what the effect was :) I just wasn't sure it was a good design choice, as the manual_start mode leaves to the user's responsibility to correctly couple start/stop calls.
To be honest I just took the draft design that was on the wiki and on vault (from Jeff iirc).
Also, wouldn't an std::clock() based Clock be worth having anyway?
Why not, will try to add one.
If you give me a day or two I can try and cleanup the code I already have. I guess we could "merge" the two solutions in some way.
AFAICS, only a Win32 Clock is provided.
No no no, this new timer class is meant to be used along with boost::posix_time::microsec_clock or boost::posix_time::second_clock.
Ok :)
It would also be useful to make a quick comparison with an
implementation based on GetProcessTimes(), if this hasn't already been discussed.
This wasn't discussed but I think it's mainly because this api never seems to be used for timing stuffs, it's usually GetTickCount(), QueryPerformanceCounter() or timeGetTime(). IIRC, boost::posix_time:microsec_clock uses GetSystemTime()...
Anyway, I'll try to do a clock() based timer and give a go at GetProcessTimes().
My code, like Beman's, is based on GetProcessTimes(), because that isn't affect by other running processes. AFAIK, the only particular advantage of GetTickCount() among Windows-specific options is that it is available everywhere, including Windows CE, IIRC.
I'll propose the whole for a fast track review once I'm done with the documentation and everything, so you think I'd not care about where this timer class should be now (date_time or timer) and let the review decide it ?
Yes, that was my idea. -- [ Gennaro Prota, C++ developer for hire ] [ resume: available on request ]