YARP  2.3.68+225-20170329.5+gitb0d3289
Yet Another Robot Platform
yarp::os::SystemClock Class Reference

#include <yarp/os/SystemClock.h>

+ Inheritance diagram for yarp::os::SystemClock:

Public Member Functions

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

Static Public Member Functions

static double nowSystem ()
 
static void delaySystem (double seconds)
 

Detailed Description

Definition at line 19 of file SystemClock.h.

Member Function Documentation

◆ delay()

virtual void yarp::os::SystemClock::delay ( double  seconds)
inlinevirtual

Wait for a certain number of seconds.

This may be fractional.

Parameters
secondsthe duration of the delay, in seconds

Implements yarp::os::Clock.

Definition at line 25 of file SystemClock.h.

◆ delaySystem()

void yarp::os::SystemClock::delaySystem ( double  seconds)
static

Definition at line 18 of file SystemClock.cpp.

◆ isValid()

virtual bool yarp::os::SystemClock::isValid ( ) const
inlinevirtual

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.

Implements yarp::os::Clock.

Definition at line 29 of file SystemClock.h.

◆ now()

virtual double yarp::os::SystemClock::now ( )
inlinevirtual

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

Returns
the time in seconds

Implements yarp::os::Clock.

Definition at line 21 of file SystemClock.h.

◆ nowSystem()

double yarp::os::SystemClock::nowSystem ( )
static

Definition at line 37 of file SystemClock.cpp.


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