19class Timestamp :
public boost::totally_ordered<Timestamp>
22 typedef uint32_t value_type;
23 typedef boost::units::make_scaled_unit<
24 boost::units::si::time,
25 boost::units::scale<10, boost::units::static_rational<-3>>
27 typedef boost::units::absolute<unit_type> absolute_unit_type;
28 typedef boost::units::quantity<absolute_unit_type, value_type> time_type;
29 typedef boost::units::quantity<unit_type, value_type> duration_type;
31 static unit_type millisecond();
32 static boost::posix_time::ptime start_time();
34 Timestamp() : m_timestamp(0) {}
35 Timestamp(time_type t) : m_timestamp(t) {}
36 Timestamp(
const Clock::time_point&);
37 Timestamp(
const boost::posix_time::ptime&);
38 value_type raw()
const {
return m_timestamp.value(); }
39 time_type quantity()
const {
return m_timestamp; }
40 Timestamp& operator+=(duration_type);
41 Timestamp& operator-=(duration_type);
48 bool before(
const Timestamp& other)
const;
55 bool after(
const Timestamp& other)
const;
58 time_type m_timestamp;