...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::interprocess::ustime
// In header: <boost/interprocess/timed_utils.hpp> class ustime { public: // public member functions explicit ustime(boost::uint64_t = 0u); ustime & operator+=(const usduration &); ustime operator+(const usduration &); ustime & operator-=(const usduration &); ustime operator-(const usduration &); bool operator<(const ustime &) const; bool operator>(const ustime &) const; bool operator<=(const ustime &) const; bool operator>=(const ustime &) const; boost::uint64_t get_microsecs() const; };
ustime
public member functionsexplicit ustime(boost::uint64_t microsecs = 0u);
Constructs a time point that is "microsecs" duration away from the epoch of the system
ustime & operator+=(const usduration & other);
ustime operator+(const usduration & other);
ustime & operator-=(const usduration & other);
ustime operator-(const usduration & other);
bool operator<(const ustime & other) const;
bool operator>(const ustime & other) const;
bool operator<=(const ustime & other) const;
bool operator>=(const ustime & other) const;
boost::uint64_t get_microsecs() const;
Returns the stored count that represents microseconds from epoch