OKVIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
okvis::Time Class Reference

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

#include <Time.hpp>

Inheritance diagram for okvis::Time:
okvis::TimeBase< Time, Duration >

Public Member Functions

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

Static Public Member Functions

static Time now ()
 Retrieve the current time. Returns the current wall clock time. More...
 
static bool sleepUntil (const Time &end)
 Sleep until a specific time has been reached. More...
 
static void init ()
 
static void shutdown ()
 
static void setNow (const Time &new_now)
 
static bool useSystemTime ()
 
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 bool waitForValid ()
 Wait for time to become valid. More...
 
static bool waitForValid (const okvis::WallDuration &timeout)
 Wait for time to become valid, with timeout. More...
 

Additional Inherited Members

- Public Attributes inherited from okvis::TimeBase< Time, Duration >
uint32_t sec
 
uint32_t nsec
 

Detailed Description

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

okvis::TimeBase provides most of its functionality.

Constructor & Destructor Documentation

okvis::Time::Time ( )
inline
okvis::Time::Time ( uint32_t  _sec,
uint32_t  _nsec 
)
inline
okvis::Time::Time ( double  t)
inlineexplicit

Member Function Documentation

void okvis::Time::init ( )
static
bool okvis::Time::isSimTime ( )
static
bool okvis::Time::isSystemTime ( )
static
bool okvis::Time::isValid ( )
static

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

Time okvis::Time::now ( )
static

Retrieve the current time. Returns the current wall clock time.

void okvis::Time::setNow ( const Time new_now)
static
void okvis::Time::shutdown ( )
static
bool okvis::Time::sleepUntil ( const Time end)
static

Sleep until a specific time has been reached.

bool okvis::Time::useSystemTime ( )
static
bool okvis::Time::waitForValid ( )
static

Wait for time to become valid.

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

Wait for time to become valid, with timeout.


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