Time representation. May either represent wall clock time or ROS clock time.
More...
#include <time.h>
Time representation. May either represent wall clock time or ROS clock time.
ros::TimeBase provides most of its functionality.
Definition at line 170 of file time.h.
◆ Time() [1/3]
◆ Time() [2/3]
ros::Time::Time |
( |
uint32_t |
_sec, |
|
|
uint32_t |
_nsec |
|
) |
| |
|
inline |
◆ Time() [3/3]
ros::Time::Time |
( |
double |
t | ) |
|
|
inlineexplicit |
◆ fromBoost() [1/2]
Time ros::Time::fromBoost |
( |
const boost::posix_time::ptime & |
t | ) |
|
|
static |
◆ fromBoost() [2/2]
Time ros::Time::fromBoost |
( |
const boost::posix_time::time_duration & |
d | ) |
|
|
static |
◆ init()
◆ isSimTime()
bool ros::Time::isSimTime |
( |
| ) |
|
|
static |
◆ isSystemTime()
bool ros::Time::isSystemTime |
( |
| ) |
|
|
static |
◆ isValid()
bool ros::Time::isValid |
( |
| ) |
|
|
static |
Returns whether or not the current time source is valid. Simulation time is valid if it is non-zero.
Definition at line 261 of file src/time.cpp.
◆ 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.
Definition at line 221 of file src/time.cpp.
◆ setNow()
void ros::Time::setNow |
( |
const Time & |
new_now | ) |
|
|
static |
◆ shutdown()
void ros::Time::shutdown |
( |
| ) |
|
|
static |
◆ sleepUntil()
bool ros::Time::sleepUntil |
( |
const Time & |
end | ) |
|
|
static |
Sleep until a specific time has been reached.
- Returns
- True if the desired sleep time was met, false otherwise.
Definition at line 334 of file src/time.cpp.
◆ useSystemTime()
bool ros::Time::useSystemTime |
( |
| ) |
|
|
static |
◆ waitForValid() [1/2]
bool ros::Time::waitForValid |
( |
| ) |
|
|
static |
Wait for time source to become valid.
Definition at line 266 of file src/time.cpp.
◆ waitForValid() [2/2]
Wait for time source to become valid, with timeout.
Definition at line 271 of file src/time.cpp.
The documentation for this class was generated from the following files: