A clock is a bundle consisting of a duration, a 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 [tab:time.clock].
In Table [tab:time.clock] C1 and C2 denote clock types. t1 and t2 are values returned by C1::now() where the call returning t1 happens before ([intro.multithread]) the call returning t2 and both of these calls occur before C1::time_point::max(). [ Note: this means C1 did not wrap around between t1 and t2. — end note ]
Table
59— Clock requirements
[ Note: The relative difference in durations between those reported by a given clock and the SI definition is a measure of the quality of implementation. — end note ]
A type TC meets the TrivialClock requirements if:
TC satisfies the Clock requirements ([time.clock.req]),
the types TC::rep, TC::duration, and TC::time_point satisfy the requirements of EqualityComparable (Table [equalitycomparable]), LessThanComparable (Table [lessthancomparable]), DefaultConstructible (Table [defaultconstructible]), CopyConstructible (Table [copyconstructible]), CopyAssignable (Table [copyassignable]), Destructible (Table [destructible]), and the requirements of numeric types ([numeric.requirements]). [ Note: this means, in particular, that operations on these types will not throw exceptions. — end note ]
lvalues of the types TC::rep, TC::duration, and TC::time_point are swappable ([swappable.requirements]),
the function TC::now() does not throw exceptions, and
the type TC::time_point::clock meets the TrivialClock requirements, recursively.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4