YARP
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 17 of file Clock.h.

Constructor & Destructor Documentation

◆ ~Clock()

yarp::os::Clock::~Clock ( )
virtualdefault

Destructor.

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::SystemClock, and yarp::os::NetworkClock.

◆ 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::SystemClock, and yarp::os::NetworkClock.

◆ 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::SystemClock, and yarp::os::NetworkClock.


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