Time representation. May either represent wall clock time or ROS clock time. More...
#include <time.h>
Public Member Functions | |
Time () | |
Time (uint32_t _sec, uint32_t _nsec) | |
Time (double t) | |
Public Member Functions inherited from ros::TimeBase< Time, Duration > | |
Time & | fromNSec (uint64_t t) |
Time & | fromSec (double t) |
bool | is_zero () const |
bool | isZero () const |
bool | operator!= (const Time &rhs) const |
Time | operator+ (const Duration &rhs) const |
Time & | operator+= (const Duration &rhs) |
Duration | operator- (const Time &rhs) const |
Time | operator- (const Duration &rhs) const |
Time & | operator-= (const Duration &rhs) |
bool | operator< (const Time &rhs) const |
bool | operator<= (const Time &rhs) const |
bool | operator== (const Time &rhs) const |
bool | operator> (const Time &rhs) const |
bool | operator>= (const Time &rhs) const |
TimeBase () | |
TimeBase (uint32_t _sec, uint32_t _nsec) | |
TimeBase (double t) | |
boost::posix_time::ptime | toBoost () const |
uint64_t | toNSec () const |
double | toSec () const |
Static Public Member Functions | |
static Time | fromBoost (const boost::posix_time::ptime &t) |
static Time | fromBoost (const boost::posix_time::time_duration &d) |
static void | init () |
static bool | isSimTime () |
static bool | isSystemTime () |
static bool | isValid () |
Returns whether or not the current time is valid. Time is valid if it is non-zero. More... | |
static Time | now () |
Retrieve the current time. If ROS clock time is in use, this returns the time according to the ROS clock. Otherwise returns the current wall clock time. More... | |
static void | setNow (const Time &new_now) |
static void | shutdown () |
static bool | sleepUntil (const Time &end) |
Sleep until a specific time has been reached. More... | |
static bool | useSystemTime () |
static bool | waitForValid () |
Wait for time to become valid. More... | |
static bool | waitForValid (const ros::WallDuration &timeout) |
Wait for time to become valid, with timeout. More... | |
Additional Inherited Members | |
Public Attributes inherited from ros::TimeBase< Time, Duration > | |
uint32_t | nsec |
uint32_t | sec |
Time representation. May either represent wall clock time or ROS clock time.
ros::TimeBase provides most of its functionality.
|
static |
Definition at line 355 of file src/time.cpp.
|
static |
Definition at line 361 of file src/time.cpp.
|
static |
Definition at line 312 of file src/time.cpp.
|
static |
Definition at line 274 of file src/time.cpp.
|
static |
Definition at line 279 of file src/time.cpp.
|
static |
Returns whether or not the current time is valid. Time is valid if it is non-zero.
Definition at line 324 of file src/time.cpp.
|
static |
Retrieve the current time. If ROS clock time is in use, this returns the time according to the ROS clock. Otherwise returns the current wall clock time.
Definition at line 284 of file src/time.cpp.
|
static |
Definition at line 304 of file src/time.cpp.
|
static |
Definition at line 319 of file src/time.cpp.
|
static |
Sleep until a specific time has been reached.
Definition at line 397 of file src/time.cpp.
|
static |
Definition at line 269 of file src/time.cpp.
|
static |
Wait for time to become valid.
Definition at line 329 of file src/time.cpp.
|
static |
Wait for time to become valid, with timeout.
Definition at line 334 of file src/time.cpp.