YARP
Yet Another Robot Platform
yarp::os::NetworkClock Class Reference

#include <yarp/os/NetworkClock.h>

+ Inheritance diagram for yarp::os::NetworkClock:

Detailed Description

Definition at line 21 of file NetworkClock.h.

Classes

class  Private
 

Public Member Functions

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

Constructor & Destructor Documentation

◆ NetworkClock()

NetworkClock::NetworkClock ( )

Definition at line 132 of file NetworkClock.cpp.

◆ ~NetworkClock()

NetworkClock::~NetworkClock ( )
virtual

Definition at line 137 of file NetworkClock.cpp.

Member Function Documentation

◆ delay()

void NetworkClock::delay ( double  seconds)
overridevirtual

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 191 of file NetworkClock.cpp.

◆ isValid()

bool NetworkClock::isValid ( ) const
overridevirtual

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 215 of file NetworkClock.cpp.

◆ now()

double NetworkClock::now ( )
overridevirtual

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

Returns
the time in seconds

Implements yarp::os::Clock.

Definition at line 183 of file NetworkClock.cpp.

◆ open()

bool NetworkClock::open ( const std::string &  clockSourcePortName,
std::string  localPortName = "" 
)

Definition at line 143 of file NetworkClock.cpp.


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