|
| TscTimePoint () |
| Default constructor, initializes to current TSC time.
|
constexpr | TimePoint () noexcept=default |
| Default constructor, initializes to epoch.
|
constexpr | TimePoint (rep nanoseconds) noexcept |
| Constructs a time point with specified time since epoch.
|
template<typename Clock, typename ChronoDuration> |
| TimePoint (const std::chrono::time_point< Clock, ChronoDuration > &time_point) noexcept |
| Constructs a time point from std::chrono::time_point.
|
constexpr | TimePoint (const TimePoint &) noexcept=default |
constexpr | TimePoint (TimePoint &&) noexcept=default |
constexpr | TimePoint () noexcept=default |
| Default constructor, initializes to epoch.
|
constexpr | TimePoint (rep nanoseconds) noexcept |
| Constructs a time point with specified time since epoch.
|
template<typename Clock, typename ChronoDuration> |
| TimePoint (const std::chrono::time_point< Clock, ChronoDuration > &time_point) noexcept |
| Constructs a time point from std::chrono::time_point.
|
constexpr | TimePoint (const TimePoint &) noexcept=default |
constexpr | TimePoint (TimePoint &&) noexcept=default |
constexpr TimePoint & | operator= (const TimePoint &) noexcept=default |
constexpr TimePoint & | operator= (TimePoint &&) noexcept=default |
chrono_time_point | to_chrono () const noexcept |
| Converts to std::chrono::time_point.
|
template<typename Clock, typename ChronoDuration = typename Clock::duration> |
std::chrono::time_point< Clock, ChronoDuration > | to () const noexcept |
| Converts to any std::chrono::time_point.
|
constexpr rep | days () const noexcept |
| Gets the time in days since epoch.
|
constexpr double | days_float () const noexcept |
| Gets the time in days since epoch with fractional precision.
|
constexpr rep | hours () const noexcept |
| Gets the time in hours since epoch.
|
constexpr double | hours_float () const noexcept |
| Gets the time in hours since epoch with fractional precision.
|
constexpr rep | minutes () const noexcept |
| Gets the time in minutes since epoch.
|
constexpr double | minutes_float () const noexcept |
| Gets the time in minutes since epoch with fractional precision.
|
constexpr rep | seconds () const noexcept |
| Gets the time in seconds since epoch.
|
constexpr double | seconds_float () const noexcept |
| Gets the time in seconds since epoch with fractional precision.
|
constexpr rep | milliseconds () const noexcept |
| Gets the time in milliseconds since epoch.
|
constexpr double | milliseconds_float () const noexcept |
| Gets the time in milliseconds since epoch with fractional precision.
|
constexpr rep | microseconds () const noexcept |
| Gets the time in microseconds since epoch.
|
constexpr double | microseconds_float () const noexcept |
| Gets the time in microseconds since epoch with fractional precision.
|
constexpr rep | nanoseconds () const noexcept |
| Gets the time in nanoseconds since epoch.
|
constexpr double | nanoseconds_float () const noexcept |
| Gets the time in nanoseconds since epoch with double precision.
|
Duration | time_since_epoch () const noexcept |
| Gets the duration since epoch.
|
constexpr rep | count () const noexcept |
| Gets the total time in nanoseconds since epoch.
|
std::string | format (std::string_view format) const |
| Formats the time point as a string.
|
std::string | to_iso8601 () const |
| Converts to ISO8601 string.
|
TimePoint & | operator+= (const Duration &duration) noexcept |
| Adds a duration to this time point.
|
TimePoint & | operator-= (const Duration &duration) noexcept |
| Subtracts a duration from this time point.
|
Represents a time point based on CPU's timestamp counter.
Extends TimePoint to specifically represent times based on the CPU's timestamp counter, which provides very high precision but may vary between CPU cores.