Yet Another Robot Platform
Time.h File Reference
#include <yarp/os/Clock.h>
#include <yarp/os/SystemClock.h>
#include <yarp/os/NetworkClock.h>
#include <string>
+ Include dependency graph for Time.h:

Go to the source code of this file.


 The main, catch-all namespace for YARP.
 An interface to the operating system, including Port based communication.


enum  yarp::os::ShouldUseSystemClock {
  yarp::os::ShouldUseSystemClock::No = 0,
  yarp::os::ShouldUseSystemClock::Yes = 1
enum  yarp::os::yarpClockType {


void yarp::os::Time::delay (double seconds)
 Wait for a certain number of seconds. More...
double yarp::os::Time::now ()
 Return the current time in seconds, relative to an arbitrary starting point. More...
void yarp::os::Time::yield ()
 The calling thread releases its remaining quantum upon calling this function. More...
void yarp::os::Time::useSystemClock ()
 Configure YARP to use system time (this is the default). More...
void yarp::os::Time::useNetworkClock (const std::string &clock, std::string localPortName="")
 Configure YARP to read time from a specified topic. More...
void yarp::os::Time::useCustomClock (Clock *clock)
 Configure YARP clients to use a custom clock source provided by the user. More...
bool yarp::os::Time::isSystemClock ()
 Check if YARP is providing system time. More...
bool yarp::os::Time::isNetworkClock ()
 Check if YARP is providing network time. More...
bool yarp::os::Time::isCustomClock ()
 Check if YARP is using a user-defined custom time. More...
yarpClockType yarp::os::Time::getClockType ()
std::string yarp::os::Time::clockTypeToString (yarpClockType type)
 Converts clock type enum into string. More...
bool yarp::os::Time::isValid ()
 Check if time is valid (non-zero). More...
void yarp::os::Time::turboBoost ()
 For OS where it makes sense sets the scheduler to be called more often. More...