Section: 23.17.3 [time.clock.req] Status: C++11 Submitter: Pete Becker Opened: 2009-01-07 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [time.clock.req].
View all issues with C++11 status.
Table 55 — Clock Requirements (in 23.17.3 [time.clock.req])
[ 2009-05-10 Howard adds: ]
"epoch" is purposefully not defined beyond the common English definition. The C standard also chose not to define epoch, though POSIX did. I believe it is a strength of the C standard that epoch is not defined. When it is known that two time_points refer to the same epoch, then a definition of the epoch is not needed to compare the two time_points, or subtract them.
A time_point and a Clock implicitly refer to an (unspecified) epoch. The time_point represents an offset (duration) from an epoch.
Different clocks may share a time_point definition if it is valid to compare their time_points by comparing their respective durations.
is redundant and could be removed. I believe the sentence which follows the above:
C1 and C2 shall refer to the same epoch.
is sufficient. If two clocks share the same epoch, then by definition, comparing their time_points is valid.
This should probably instead be worded:
An instantiation of ratio.
[ Batavia (2009-05): ]
Re (a): It is not clear to us whether "epoch" is a term of art.
Re (b), (c), and (d): We agree with Howard's comments, and would consider adding to (c) a static constexpr requirement.
Move to Open pending proposed wording.
[ 2009-05-25 Daniel adds: ]
In regards to (d) I suggest to say "a specialization of ratio" instead of "An instantiation of ratio". This seems to be the better matching standard core language term for this kind of entity.
[ 2009-05-25 Ganesh adds: ]
Regarding (a), I found this paper on the ISO website using the term "epoch" consistently with the current wording:
which is part of ISO/IEC 18026 "Information technology -- Spatial Reference Model (SRM)".
[ 2009-08-01 Howard: Moved to Reivew as the wording requested in Batavia has been provided. ]
[ 2009-10 Santa Cruz: ]
Move to Ready.
Change 23.17.3 [time.clock.req] p1:
-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. A clock shall meet the requirements in Table 45.
Remove the sentence from the time_point row of the table "Clock Requirements":
|C1::time_point||chrono::time_point<C1> or chrono::time_point<C2, C1::duration>||
The native time_point type of the clock.
Change the row starting with C1::period of the table "Clock Requirements":
|C1::period||ratio||The tick period of the clock in seconds.|