37 #ifndef OMPL_UTIL_TIME_
38 #define OMPL_UTIL_TIME_
40 #include <boost/date_time/posix_time/posix_time.hpp>
50 typedef boost::posix_time::ptime
point;
53 typedef boost::posix_time::time_duration
duration;
58 return boost::posix_time::microsec_clock::universal_time();
65 long us = (long)((sec - (
double)s) * 1000000);
66 return boost::posix_time::seconds(s) + boost::posix_time::microseconds(us);
72 return (
double)d.total_microseconds() / 1000000.0;
boost::posix_time::time_duration duration
Representation of a time duration.
duration seconds(double sec)
Return the time duration representing a given number of seconds.
Main namespace. Contains everything in this library.
boost::posix_time::ptime point
Representation of a point in time.
point now()
Get the current time point.