tmp/tmp7g7fi79o/{from.md → to.md}
RENAMED
|
@@ -1,38 +1,34 @@
|
|
| 1 |
-
##
|
| 2 |
|
| 3 |
A clock is a bundle consisting of a `duration`, a `time_point`, and a
|
| 4 |
function `now()` to get the current `time_point`. The origin of the
|
| 5 |
clock’s `time_point` is referred to as the clock’s *epoch*. A clock
|
| 6 |
-
shall meet the requirements in
|
| 7 |
|
| 8 |
-
In
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
|
| 13 |
[*Note 1*: This means `C1` did not wrap around between `t1` and
|
| 14 |
`t2`. — *end note*]
|
| 15 |
|
| 16 |
[*Note 2*: The relative difference in durations between those reported
|
| 17 |
by a given clock and the SI definition is a measure of the quality of
|
| 18 |
implementation. — *end note*]
|
| 19 |
|
| 20 |
-
A type `TC` meets the
|
| 21 |
|
| 22 |
-
- `TC`
|
| 23 |
-
- the types `TC::rep`, `TC::duration`, and `TC::time_point`
|
| 24 |
-
|
| 25 |
-
[[
|
| 26 |
-
[[
|
| 27 |
-
[[tab:defaultconstructible]]), `CopyConstructible` (Table
|
| 28 |
-
[[tab:copyconstructible]]), `CopyAssignable` (Table
|
| 29 |
-
[[tab:copyassignable]]), `Destructible` (Table [[tab:destructible]]),
|
| 30 |
-
and the requirements of numeric types ([[numeric.requirements]]).
|
| 31 |
\[*Note 3*: This means, in particular, that operations on these types
|
| 32 |
will not throw exceptions. — *end note*]
|
| 33 |
- lvalues of the types `TC::rep`, `TC::duration`, and `TC::time_point`
|
| 34 |
-
are swappable
|
| 35 |
- the function `TC::now()` does not throw exceptions, and
|
| 36 |
-
- the type `TC::time_point::clock` meets the
|
| 37 |
requirements, recursively.
|
| 38 |
|
|
|
|
| 1 |
+
## *Cpp17Clock* requirements <a id="time.clock.req">[[time.clock.req]]</a>
|
| 2 |
|
| 3 |
A clock is a bundle consisting of a `duration`, a `time_point`, and a
|
| 4 |
function `now()` to get the current `time_point`. The origin of the
|
| 5 |
clock’s `time_point` is referred to as the clock’s *epoch*. A clock
|
| 6 |
+
shall meet the requirements in [[time.clock]].
|
| 7 |
|
| 8 |
+
In [[time.clock]] `C1` and `C2` denote clock types. `t1` and `t2` are
|
| 9 |
+
values returned by `C1::now()` where the call returning `t1` happens
|
| 10 |
+
before [[intro.multithread]] the call returning `t2` and both of these
|
| 11 |
+
calls occur before `C1::time_point::max()`.
|
| 12 |
|
| 13 |
[*Note 1*: This means `C1` did not wrap around between `t1` and
|
| 14 |
`t2`. — *end note*]
|
| 15 |
|
| 16 |
[*Note 2*: The relative difference in durations between those reported
|
| 17 |
by a given clock and the SI definition is a measure of the quality of
|
| 18 |
implementation. — *end note*]
|
| 19 |
|
| 20 |
+
A type `TC` meets the *Cpp17TrivialClock* requirements if:
|
| 21 |
|
| 22 |
+
- `TC` meets the *Cpp17Clock* requirements [[time.clock.req]],
|
| 23 |
+
- the types `TC::rep`, `TC::duration`, and `TC::time_point` meet the
|
| 24 |
+
*Cpp17EqualityComparable* ([[cpp17.equalitycomparable]]) and
|
| 25 |
+
*Cpp17LessThanComparable* ([[cpp17.lessthancomparable]]) requirements
|
| 26 |
+
and the requirements of numeric types [[numeric.requirements]].
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
\[*Note 3*: This means, in particular, that operations on these types
|
| 28 |
will not throw exceptions. — *end note*]
|
| 29 |
- lvalues of the types `TC::rep`, `TC::duration`, and `TC::time_point`
|
| 30 |
+
are swappable [[swappable.requirements]],
|
| 31 |
- the function `TC::now()` does not throw exceptions, and
|
| 32 |
+
- the type `TC::time_point::clock` meets the *Cpp17TrivialClock*
|
| 33 |
requirements, recursively.
|
| 34 |
|