The std::chrono::treat_as_floating_point
trait helps determine if a duration can be converted to another duration with a different tick period.
Implicit conversions between two durations normally depends on the tick period of the durations. However, implicit conversions can happen regardless of tick period if std::chrono::treat_as_floating_point<Rep>::value is true.
[edit] Helper variable templatetemplate< class Rep >
constexpr bool treat_as_floating_point_v = treat_as_floating_point<Rep>::value;
std::chrono::treat_as_floating_point
may be specialized for program-defined types.
Possible output:
Running some timed piece of code... Timing stats: Time in milliseconds, using default rep: 2 Time in milliseconds, using floating point rep: 2.57307[edit] See also
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