YARP  2.3.68+228-20170410.2+git7d0b2e0
Yet Another Robot Platform
yarp::os::Clock Class Referenceabstract

#include <yarp/os/Clock.h>

+ Inheritance diagram for yarp::os::Clock:

Public Member Functions

virtual ~Clock ()
 Destructor. More...
 
virtual double now ()=0
 Return the current time in seconds, relative to an arbitrary starting point. More...
 
virtual void delay (double seconds)=0
 Wait for a certain number of seconds. More...
 
virtual bool isValid () const =0
 Check if time is valid (non-zero). More...
 

Detailed Description

Definition at line 18 of file Clock.h.

Constructor & Destructor Documentation

◆ ~Clock()

virtual yarp::os::Clock::~Clock ( )
inlinevirtual

Destructor.

Definition at line 25 of file Clock.h.

Member Function Documentation

◆ delay()

virtual void yarp::os::Clock::delay ( double  seconds)
pure virtual

Wait for a certain number of seconds.

This may be fractional.

Parameters
secondsthe duration of the delay, in seconds

Implemented in yarp::os::NetworkClock, and yarp::os::SystemClock.

◆ isValid()

virtual bool yarp::os::Clock::isValid ( ) const
pure virtual

Check if time is valid (non-zero).

For example, for a network clock, if no timestamp has yet been received, this method will return false.

Implemented in yarp::os::NetworkClock, and yarp::os::SystemClock.

◆ now()

virtual double yarp::os::Clock::now ( )
pure virtual

Return the current time in seconds, relative to an arbitrary starting point.

Returns
the time in seconds

Implemented in yarp::os::NetworkClock, and yarp::os::SystemClock.


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