Each available unit of time from days to nanoseconds.
More...
|
|
typedef std::chrono::duration< double > | Timepiece::secs |
| |
|
typedef std::chrono::duration< double, std::ratio_multiply< std::ratio< 60 >, secs::period > > | Timepiece::mins |
| |
|
typedef std::chrono::duration< double, std::ratio_multiply< std::ratio< 60 >, mins::period > > | Timepiece::hrs |
| |
|
typedef std::chrono::duration< double, std::ratio_multiply< std::ratio< 24 >, hrs::period > > | Timepiece::das |
| |
|
typedef std::chrono::duration< double, std::ratio_multiply< secs::period, std::ratio< 1000 > > > | Timepiece::ms |
| |
|
typedef std::chrono::duration< double, std::ratio_multiply< ms::period, std::ratio< 1000 > > > | Timepiece::us |
| |
|
typedef std::chrono::duration< double, std::ratio_multiply< us::period, std::ratio< 1000 > > > | Timepiece::ns |
| |
Unlike in the standard which defines each unit as an exact value, each of these units are defined in reference to the next unit closest to the base unit of seconds.
Type double is required to allow for fractional parts of the unit. A fractional part in one unit will precisely equate to the whole part of smaller units within the degree of double point precision. That is, for 1.5 seconds, the 0.5 will exactly equal 500 milliseconds.