|
| EpochTimestamp () |
| Initialize epoch timestamp.
|
|
| EpochTimestamp (const Timestamp ×tamp) |
| Initialize epoch timestamp with another timestamp value.
|
|
| Timestamp () noexcept |
| Initialize timestamp with an epoch time.
|
|
| Timestamp (uint64_t timestamp) noexcept |
| Initialize timestamp with a given time moment in nanoseconds.
|
|
template<class Clock , class Duration > |
| Timestamp (const std::chrono::time_point< Clock, Duration > &time_point) noexcept |
| Initialize timestamp with a given std::chrono time point.
|
|
| Timestamp (const Timestamp &) noexcept=default |
|
| Timestamp (Timestamp &&) noexcept=default |
|
| Timestamp () noexcept |
| Initialize timestamp with an epoch time.
|
|
| Timestamp (uint64_t timestamp) noexcept |
| Initialize timestamp with a given time moment in nanoseconds.
|
|
template<class Clock , class Duration > |
| Timestamp (const std::chrono::time_point< Clock, Duration > &time_point) noexcept |
| Initialize timestamp with a given std::chrono time point.
|
|
| Timestamp (const Timestamp &) noexcept=default |
|
| Timestamp (Timestamp &&) noexcept=default |
|
| ~Timestamp () noexcept=default |
|
Timestamp & | operator= (uint64_t timestamp) noexcept |
|
Timestamp & | operator= (const Timestamp &) noexcept=default |
|
Timestamp & | operator= (Timestamp &&) noexcept=default |
|
Timestamp & | operator+= (int64_t offset) noexcept |
|
Timestamp & | operator+= (const Timespan &offset) noexcept |
|
Timestamp & | operator-= (int64_t offset) noexcept |
|
Timestamp & | operator-= (const Timespan &offset) noexcept |
|
std::chrono::system_clock::time_point | chrono () const noexcept |
| Convert timestamp to the std::chrono time point.
|
|
uint64_t | days () const noexcept |
| Get total days of the current timestamp.
|
|
uint64_t | hours () const noexcept |
| Get total hours of the current timestamp.
|
|
uint64_t | minutes () const noexcept |
| Get total minutes of the current timestamp.
|
|
uint64_t | seconds () const noexcept |
| Get total seconds of the current timestamp.
|
|
uint64_t | milliseconds () const noexcept |
| Get total milliseconds of the current timestamp.
|
|
uint64_t | microseconds () const noexcept |
| Get total microseconds of the current timestamp.
|
|
uint64_t | nanoseconds () const noexcept |
| Get total nanoseconds of the current timestamp.
|
|
uint64_t | total () const noexcept |
| Get total value of the current timestamp (total nanoseconds)
|
|
void | swap (Timestamp ×tamp) noexcept |
| Swap two instances.
|
|
|
static Timestamp | days (int64_t days) noexcept |
| Create the timestamp based on the given days value.
|
|
static Timestamp | hours (int64_t hours) noexcept |
| Create the timestamp based on the given hours value.
|
|
static Timestamp | minutes (int64_t minutes) noexcept |
| Create the timestamp based on the given minutes value.
|
|
static Timestamp | seconds (int64_t seconds) noexcept |
| Create the timestamp based on the given seconds value.
|
|
static Timestamp | milliseconds (int64_t milliseconds) noexcept |
| Create the timestamp based on the given milliseconds value.
|
|
static Timestamp | microseconds (int64_t microseconds) noexcept |
| Create the timestamp based on the given microseconds value.
|
|
static Timestamp | nanoseconds (int64_t nanoseconds) noexcept |
| Create the timestamp based on the given nanoseconds value.
|
|
static uint64_t | epoch () noexcept |
| Get the epoch timestamp.
|
|
static uint64_t | utc () |
| Get the UTC timestamp.
|
|
static uint64_t | local () |
| Get the local timestamp.
|
|
static uint64_t | nano () |
| Get the high resolution timestamp.
|
|
static uint64_t | rdts () |
| Get the current value of RDTS (Read Time Stamp Counter)
|
|
uint64_t | _timestamp |
| Timestamp value.
|
|
Epoch timestamp.
- Examples
- time_timestamp.cpp.
Definition at line 235 of file timestamp.h.