Public Member Functions | Static Public Member Functions | List of all members
roswrap::Time Class Reference

Time representation. May either represent wall clock time or ROS clock time. More...

#include <time.h>

Inheritance diagram for roswrap::Time:
Inheritance graph
[legend]

Public Member Functions

 Time ()
 
 Time (double t)
 
 Time (uint32_t _sec, uint32_t _nsec)
 
- Public Member Functions inherited from roswrap::TimeBase< Time, Duration >
TimefromNSec (uint64_t t)
 
TimefromSec (double t)
 
bool is_zero () const
 
bool isZero () const
 
bool operator!= (const Time &rhs) const
 
Time operator+ (const Duration &rhs) const
 
Timeoperator+= (const Duration &rhs)
 
Time operator- (const Duration &rhs) const
 
Duration operator- (const Time &rhs) const
 
Timeoperator-= (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 (double t)
 
 TimeBase (uint32_t _sec, uint32_t _nsec)
 
uint64_t toNSec () const
 
double toSec () const
 
 ~TimeBase ()
 

Static Public Member Functions

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 roswrap::TimeBase< Time, Duration >
uint32_t nsec
 
uint32_t sec
 

Detailed Description

Time representation. May either represent wall clock time or ROS clock time.

ros::TimeBase provides most of its functionality.

Definition at line 177 of file time.h.

Constructor & Destructor Documentation

◆ Time() [1/3]

roswrap::Time::Time ( )
inline

Definition at line 180 of file time.h.

◆ Time() [2/3]

roswrap::Time::Time ( uint32_t  _sec,
uint32_t  _nsec 
)
inline

Definition at line 184 of file time.h.

◆ Time() [3/3]

roswrap::Time::Time ( double  t)
inlineexplicit

Definition at line 188 of file time.h.

Member Function Documentation

◆ init()

void Time::init ( )
static

Definition at line 331 of file time_modi.cpp.

◆ isSimTime()

bool Time::isSimTime ( )
static

Definition at line 293 of file time_modi.cpp.

◆ isSystemTime()

bool Time::isSystemTime ( )
static

Definition at line 298 of file time_modi.cpp.

◆ isValid()

bool Time::isValid ( )
static

Returns whether or not the current time is valid. Time is valid if it is non-zero.

Definition at line 343 of file time_modi.cpp.

◆ now()

Time Time::now ( )
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 303 of file time_modi.cpp.

◆ setNow()

void Time::setNow ( const Time new_now)
static

Definition at line 323 of file time_modi.cpp.

◆ shutdown()

void Time::shutdown ( )
static

Definition at line 338 of file time_modi.cpp.

◆ sleepUntil()

bool 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 419 of file time_modi.cpp.

◆ useSystemTime()

bool Time::useSystemTime ( )
static

Definition at line 288 of file time_modi.cpp.

◆ waitForValid() [1/2]

bool Time::waitForValid ( )
static

Wait for time to become valid.

Definition at line 348 of file time_modi.cpp.

◆ waitForValid() [2/2]

bool Time::waitForValid ( const ros::WallDuration timeout)
static

Wait for time to become valid, with timeout.

Definition at line 353 of file time_modi.cpp.


The documentation for this class was generated from the following files:


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:15