|
Boost : |
From: Philippe Vaucher (philippe.vaucher_at_[hidden])
Date: 2006-06-26 05:14:43
> Sorry I haven't got a chance to look at this till now. First, it might be
> nice if you could upload a version to the vault so other people can try it
> out.
Ok will do so with the next version that should come very soon.
I think this code is both inefficient and likely non-portable.
Hum, by definition QueryPerformanceCounter is non-portable ?
As I understand it, QueryPerformanceCounter has a hardware defined
> resolution that
> can be queried by calling QueryPerformanceFrequency. QPF provides the
> counts
> per second. You should be able to use this to more simply construct the
> time_duration. So, for example, if QPF returned 1000 you could simply say
>
> m_elapsed +=
> boost::posix_time::milliseconds(current-previous);
>
> I'm guessing nanoseconds might be the best duration type to use in the
> calculation.
>
Hum you are probably right, I'm not that much used to date_time so I thought
I had to construct using the constructor but what you just showed is indeed
much simpler.
Thank you
Philippe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk