51 [[nodiscard]]
constexpr std::int64_t
get_epoch_second() const noexcept {
return m_seconds; }
56 [[nodiscard]]
constexpr std::int32_t
get_nano() const noexcept {
return m_nanos; }
65 if (m_seconds != other.m_seconds) {
66 return m_seconds < other.m_seconds ? -1 : 1;
68 return m_nanos - other.m_nanos;
73 std::int64_t m_seconds = 0;
76 std::int32_t m_nanos = 0;
86constexpr bool operator==(
const ignite_timestamp &lhs,
const ignite_timestamp &rhs)
noexcept {
87 return lhs.compare(rhs) == 0;
98 return lhs.compare(rhs) != 0;
109 return lhs.compare(rhs) < 0;
120 return lhs.compare(rhs) <= 0;
131 return lhs.compare(rhs) > 0;
142 return lhs.compare(rhs) >= 0;
A moment of time.
Definition ignite_timestamp.h:29
constexpr std::int64_t get_epoch_second() const noexcept
Definition ignite_timestamp.h:51
constexpr ignite_timestamp() noexcept=default
constexpr int compare(const ignite_timestamp &other) const noexcept
Definition ignite_timestamp.h:64
constexpr std::int32_t get_nano() const noexcept
Definition ignite_timestamp.h:56