Class SystemTimestamp¶
Defined in File timestamp.h
Class Documentation¶
-
class
opentelemetry::common
::
SystemTimestamp
¶ A timepoint relative to the system clock epoch.
This is used for marking the beginning and end of an operation.
Public Functions
-
inline
SystemTimestamp
() noexcept¶ Initializes a system timestamp pointing to the start of the epoch.
-
template<class
Rep
, classPeriod
>
inline explicitSystemTimestamp
(const std::chrono::duration<Rep, Period> &time_since_epoch) noexcept¶ Initializes a system timestamp from a duration.
- Parameters
time_since_epoch – Time elapsed since the beginning of the epoch.
-
inline
SystemTimestamp
(const std::chrono::system_clock::time_point &time_point) noexcept¶ Initializes a system timestamp based on a point in time.
- Parameters
time_point – A point in time.
-
inline
operator std::chrono::system_clock::time_point
() const noexcept¶ Returns a time point for the time stamp.
- Returns
A time point corresponding to the time stamp.
-
inline std::chrono::nanoseconds
time_since_epoch
() const noexcept¶ Returns the nanoseconds since the beginning of the epoch.
- Returns
Elapsed nanoseconds since the beginning of the epoch for this timestamp.
-
inline bool
operator==
(const SystemTimestamp &other) const noexcept¶ Compare two steady time stamps.
- Returns
true if the two time stamps are equal.
-
inline bool
operator!=
(const SystemTimestamp &other) const noexcept¶ Compare two steady time stamps for inequality.
- Returns
true if the two time stamps are not equal.
-
inline