YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::os::Clock Class Referenceabstract

#include <yarp/os/Clock.h>

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

Public Member Functions

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

Detailed Description

Definition at line 13 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::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 files: