|
Leka
A low-latency C++20 price-time-priority limit order book and matching engine
|
Nanoseconds since the Unix epoch; zero is reserved as invalid. More...
#include <timestamp.hpp>
Public Member Functions | |
| Timestamp () | |
| Constructs an invalid, zero-valued timestamp. | |
| Timestamp (std::uint64_t timestamp) | |
| Constructs a timestamp from nanoseconds since the Unix epoch. | |
| std::uint64_t | getTimestamp () const |
| Returns nanoseconds since the Unix epoch. | |
| bool | isValid () const |
| Returns whether the timestamp is nonzero. | |
| auto | operator<=> (const Timestamp &other) const =default |
| Compares timestamps chronologically. | |
Nanoseconds since the Unix epoch; zero is reserved as invalid.
Definition at line 10 of file timestamp.hpp.
|
inline |
Constructs an invalid, zero-valued timestamp.
Definition at line 16 of file timestamp.hpp.
Referenced by operator<=>().
|
inlineexplicit |
Constructs a timestamp from nanoseconds since the Unix epoch.
Definition at line 19 of file timestamp.hpp.
|
inline |
Returns nanoseconds since the Unix epoch.
Definition at line 22 of file timestamp.hpp.
|
inline |
Returns whether the timestamp is nonzero.
Definition at line 25 of file timestamp.hpp.
|
default |
Compares timestamps chronologically.
References Timestamp().