18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_UPDATE_H_ 19 #define LOCATION_SERVICE_COM_UBUNTU_LOCATION_UPDATE_H_ 82 inline std::ostream& operator<<(std::ostream& out, const Update<T>& update)
84 out <<
"Update(" << update.value <<
", " << update.when.time_since_epoch().count() <<
")";
92 #endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_UPDATE_H_ bool operator!=(const Update< T > &rhs) const
operator != checks if two updates are unequal.
static Timestamp now()
Samples a timestamp from the clock.
Templated class that wraps a value and timestamp.
std::chrono::high_resolution_clock::time_point Timestamp
Timestamp type of the location service clock.
bool operator==(const Update< T > &rhs) const
operator == checks if two updates are equal.
Update(const T &value=T{}, const Clock::Timestamp &when=Clock::now())
Constructs a valid update with the given value and timestamp.
static Timestamp beginning_of_time()
Samples a timestamp from the clock.