Title
Various threading bugs #7
Status
c++11
Section
[time.clock.system]
Submitter
Pete Becker

Created on 2009-01-07.00:00:00 last changed 161 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

In [time.clock.system] replace paragraphs 3 and 4 with:

time_t to_time_t(const time_point& t);

-3- Returns: A time_t object that represents the same point in time as t when both values are truncated restricted to the coarser of the precisions of time_t and time_point. It is implementation defined whether values are rounded or truncated to the required precision.

time_point from_time_t(time_t t);

-4- Returns: A time_point object that represents the same point in time as t when both values are truncated restricted to the coarser of the precisions of time_t and time_point. It is implementation defined whether values are rounded or truncated to the required precision.

Date: 2010-10-21.18:28:33

[ 2009-10 Santa Cruz: ]

Move to Ready.

Date: 2009-05-23.00:00:00

[ 2009-05-23 Howard adds: ]

I am in favor of the wording provided by Anthony.

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

Move to Review pending input from Howard. and other stakeholders.

Date: 2010-10-21.18:28:33

[ Post Summit Anthony Williams provided proposed wording. ]

Date: 2009-01-07.00:00:00

[time.clock.system]: to_time_t is overspecified. It requires truncation, but should allow rounding. For example, suppose a system has a clock that gives times in milliseconds, but time() rounds those times to the nearest second. Then system_clock can't use any resolution finer than one second, because if it did, truncating times between half a second and a full second would produce the wrong time_t value.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg4558
2010-10-21 18:28:33adminsetmessages: + msg4557
2010-10-21 18:28:33adminsetmessages: + msg4556
2010-10-21 18:28:33adminsetmessages: + msg4555
2010-10-21 18:28:33adminsetmessages: + msg4554
2009-01-07 00:00:00admincreate