From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-10-29 12:53:23
>> Now I also understand better the sentence that appear in N2320 in all
>> timed functions: "ElapsedTime shall be explicitly convertible to
>> nanoseconds". It's because nanoseconds are the basic for all. Now lets
> I'll check, but that's incorrect and has been removed. They don't need to
> convertible to nanoseconds, they need to provide get_count and a
> ticks_per_second trait to allow conversion to the system time resolution.
This strikes me as overgeneralization (speaking strictly of the
thread-related portions of the standard). I don't quite see why
struct std::abstime: public timespec
struct std::reltime: public timespec
// overloaded operators, a way to obtain the system time...
isn't enough. POSIX uses timespec and Windows uses milliseconds.
> Yes, it will, but the time duration type provides all the machinery to
> the needed rounding. Frankly rounding will be the majority of the cases
> you use nanoseconds because few systems currently have clock support at
POSIX systems use nanoseconds in the interface. timespec is
or to be precise, its definition is:
"The <time.h> header shall declare the structure timespec, which has at
least the following members:
time_t tv_sec Seconds.
long tv_nsec Nanoseconds."
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk