CppCommon
1.0.4.1
C++ Common Library
|
RDTS timestamp. More...
#include <timestamp.h>
Public Member Functions | |
RdtsTimestamp () | |
Initialize RDTS timestamp with a current RDTS time. More... | |
RdtsTimestamp (const Timestamp ×tamp) | |
Initialize RDTS timestamp with another timestamp value. More... | |
Timestamp () noexcept | |
Initialize timestamp with an epoch time. More... | |
Timestamp (uint64_t timestamp) noexcept | |
Initialize timestamp with a given time moment in nanoseconds. More... | |
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. More... | |
Timestamp (const Timestamp &) noexcept=default | |
Timestamp (Timestamp &&) noexcept=default | |
Public Member Functions inherited from CppCommon::Timestamp | |
Timestamp () noexcept | |
Initialize timestamp with an epoch time. More... | |
Timestamp (uint64_t timestamp) noexcept | |
Initialize timestamp with a given time moment in nanoseconds. More... | |
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. More... | |
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. More... | |
uint64_t | days () const noexcept |
Get total days of the current timestamp. More... | |
uint64_t | hours () const noexcept |
Get total hours of the current timestamp. More... | |
uint64_t | minutes () const noexcept |
Get total minutes of the current timestamp. More... | |
uint64_t | seconds () const noexcept |
Get total seconds of the current timestamp. More... | |
uint64_t | milliseconds () const noexcept |
Get total milliseconds of the current timestamp. More... | |
uint64_t | microseconds () const noexcept |
Get total microseconds of the current timestamp. More... | |
uint64_t | nanoseconds () const noexcept |
Get total nanoseconds of the current timestamp. More... | |
uint64_t | total () const noexcept |
Get total value of the current timestamp (total nanoseconds) More... | |
void | swap (Timestamp ×tamp) noexcept |
Swap two instances. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from CppCommon::Timestamp | |
static Timestamp | days (int64_t days) noexcept |
Create the timestamp based on the given days value. More... | |
static Timestamp | hours (int64_t hours) noexcept |
Create the timestamp based on the given hours value. More... | |
static Timestamp | minutes (int64_t minutes) noexcept |
Create the timestamp based on the given minutes value. More... | |
static Timestamp | seconds (int64_t seconds) noexcept |
Create the timestamp based on the given seconds value. More... | |
static Timestamp | milliseconds (int64_t milliseconds) noexcept |
Create the timestamp based on the given milliseconds value. More... | |
static Timestamp | microseconds (int64_t microseconds) noexcept |
Create the timestamp based on the given microseconds value. More... | |
static Timestamp | nanoseconds (int64_t nanoseconds) noexcept |
Create the timestamp based on the given nanoseconds value. More... | |
static uint64_t | epoch () noexcept |
Get the epoch timestamp. More... | |
static uint64_t | utc () |
Get the UTC timestamp. More... | |
static uint64_t | local () |
Get the local timestamp. More... | |
static uint64_t | nano () |
Get the high resolution timestamp. More... | |
static uint64_t | rdts () |
Get the current value of RDTS (Read Time Stamp Counter) More... | |
Protected Attributes inherited from CppCommon::Timestamp | |
uint64_t | _timestamp |
Timestamp value. More... | |
|
inline |
Initialize RDTS timestamp with a current RDTS time.
Definition at line 289 of file timestamp.h.
|
inline |
Initialize RDTS timestamp with another timestamp value.
Definition at line 291 of file timestamp.h.
|
inlinenoexcept |
Initialize timestamp with an epoch time.
Definition at line 33 of file timestamp.h.
|
inlineexplicitnoexcept |
Initialize timestamp with a given std::chrono time point.
time_point | - std::chrono time point |
Definition at line 44 of file timestamp.h.
|
defaultnoexcept |
|
defaultnoexcept |
|
inlineexplicitnoexcept |
Initialize timestamp with a given time moment in nanoseconds.
timestamp | - Time moment in nanoseconds |
Definition at line 38 of file timestamp.h.