1#ifndef PROTON_TIMESTAMP_HPP
2#define PROTON_TIMESTAMP_HPP
25#include <proton/type_compat.h>
35class timestamp :
private internal::comparable<timestamp> {
58inline bool operator==(timestamp x, timestamp y) {
return x.milliseconds() == y.milliseconds(); }
59inline bool operator<(
timestamp x,
timestamp y) {
return x.milliseconds() < y.milliseconds(); }
A span of time in milliseconds.
Definition duration.hpp:39
A 64-bit timestamp in milliseconds since the Unix epoch.
Definition timestamp.hpp:35
int64_t numeric_type
A numeric type holding a value in milliseconds.
Definition timestamp.hpp:38
timestamp & operator=(numeric_type ms)
Assign a value in milliseconds.
Definition timestamp.hpp:47
timestamp(numeric_type ms=0)
Construct from a value in milliseconds.
Definition timestamp.hpp:44
static timestamp now()
The current wall-clock time.
numeric_type milliseconds() const
Get the value in milliseconds.
Definition timestamp.hpp:50
A span of time in milliseconds.
The main Proton namespace.
Definition annotation_key.hpp:33
std::ostream & operator<<(std::ostream &, const binary &)
Print a binary value.