⏱️ golxzn::os::chrono ⏱️ 1.2.4
Chrono for golxzn's projects.
|
Class that represents fast clock, which store only one time point.This class allows to measure time since last call of elapsed() or since construction. It's fast because it doesn't store any information but last time point This class provides measurement of elapsed time since last call of elapsed() or since construction.
More...It doesn't store any information but last time point. When you call elapsed(), it stores new time point, and returns difference of old and new time points.
#include <clock.hpp>
Public Types | |
using | base_clock = BaseClock |
Base clock type. | |
using | time_point = typename base_clock::time_point |
Time point type from base clock. | |
Public Member Functions | |
time | elapsed () noexcept |
Returns elapsed time since last call of elapsed() or since construction. | |
Static Public Attributes | |
static constexpr time_point | zero {} |
Zero time point. | |
Class that represents fast clock, which store only one time point.
This class allows to measure time since last call of elapsed() or since construction. It's fast because it doesn't store any information but last time point This class provides measurement of elapsed time since last call of elapsed() or since construction.
It doesn't store any information but last time point. When you call elapsed(), it stores new time point, and returns difference of old and new time points.
BaseClock | clock that will be used for measurement. It has to be monotonic and STL compatible. |
Usage:
|
noexcept |
Returns elapsed time since last call of elapsed()
or since construction.