Go to the documentation of this file.
24 #ifndef GOBY_TIME_ASIO_H
25 #define GOBY_TIME_ASIO_H
27 #include <boost/asio/time_traits.hpp>
28 #include <boost/date_time.hpp>
47 template <>
struct time_traits<
goby::time::ASIOGobyTime>
56 static time_type now() {
return goby::time::SystemClock::now<boost::posix_time::ptime>(); }
The global namespace for the Goby project.
static bool less_than(const time_type &t1, const time_type &t2)
Test whether one time is less than another.
boost::posix_time::ptime time_type
The time type.
boost::posix_time::time_duration duration_type
The duration type.
static time_type add(const time_type &t, const duration_type &d)
Add a duration to a time.
static boost::posix_time::time_duration to_posix_duration(const duration_type &d)
Convert to POSIX duration type.
static int warp_factor
Warp factor to speed up (or slow time) the time values returned by SteadyClock::now() and SystemClock...
static duration_type subtract(const time_type &t1, const time_type &t2)
Subtract one time from another.
unit< time_dimension, si::system > time
static time_type now()
Get the current time.