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

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

Messages

Date: 2010-11-24.14:01:03

Proposed resolution:

Change [time.clock.req]:

1 A clock is a bundle consisting of a native duration, a native time_point, and a function now() to get the current time_point. The origin of the clock's time_point is referred to as the clock's epoch. A clock shall meet the requirements in Table 56.

2 ...

Table 56 — Clock requirements
Expression Return type Operational semantics
C1::rep An arithmetic type or a class emulating an arithmetic type The representation type of the native C1::duration. and time_point.
C1::period ... ...
C1::duration chrono::duration<C1::rep, C1::period> The native duration type of the clock.
C1::time_point chrono::time_point<C1> or chrono::time_point<C2, C1::duration> The native time_point type of the clock. C1 and C2 shall refer to the same epoch.
...
Date: 2010-11-24.14:01:03

[ Adopted at 2010-11 Batavia ]

Date: 2010-10-31.20:22:50

[ Post-Rapperswil, Howard provides wording: ]

Moved to Tentatively Ready with revised wording from Howard Hinnant after 5 positive votes on c++std-lib.

Date: 2010-03-28.00:00:00

[ 2010-03-28 Daniel synced wording with N3092 ]

Date: 2009-11-18.00:00:00

[ 2009-11-18 Daniel adds: ]

I see that [thread.timedmutex.requirements]/3 says:

Precondition: If the tick period of rel_time is not exactly convertible to the native tick period, the duration shall be rounded up to the nearest native tick period.

I would prefer to see that adapted as well. Following the same style as the proposed resolution I come up with

Precondition: If the tick period of rel_time is not exactly convertible to the native tick period of the execution environment, the duration shall be rounded up to the nearest native tick period of the execution environment.

Date: 2009-10-23.00:00:00

[ 2009-10-23 Pete provides wording: ]

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

Move to Open pending proposed wording from Pete.

Date: 2009-05-10.00:00:00

[ 2009-05-10 Howard adds: ]

The standard uses "native" in several places without defining it (e.g. [lex.ccon]). It is meant to mean "that which is defined by the facility", or something along those lines. In this case it refers to the nested time_point and duration types of the clock. Better wording is welcome.

Date: 2009-01-07.00:00:00

[time.clock.req] uses the word "native" in several places, but doesn't define it. What is a "native duration"?

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-11-24 14:01:03adminsetmessages: + msg5416
2010-11-14 13:10:57adminsetstatus: voting -> wp
2010-11-08 14:14:39adminsetstatus: ready -> voting
2010-10-21 19:06:53adminsetmessages: + msg4778
2010-10-21 19:06:53adminsetstatus: open -> ready
2010-10-21 18:28:33adminsetmessages: + msg4552
2010-10-21 18:28:33adminsetmessages: + msg4551
2010-10-21 18:28:33adminsetmessages: + msg4550
2010-10-21 18:28:33adminsetmessages: + msg4549
2010-10-21 18:28:33adminsetmessages: + msg4548
2010-10-21 18:28:33adminsetmessages: + msg4547
2009-01-07 00:00:00admincreate