YARP
Yet Another Robot Platform
Clock.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2019 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_OS_CLOCK_H
10 #define YARP_OS_CLOCK_H
11 
12 #include <yarp/os/api.h>
13 
14 namespace yarp {
15 namespace os {
16 
18 {
19 public:
23  virtual ~Clock();
24 
30  virtual double now() = 0;
31 
36  virtual void delay(double seconds) = 0;
37 
43  virtual bool isValid() const = 0;
44 };
45 
46 } // namespace os
47 } // namespace yarp
48 
49 #endif // YARP_OS_CLOCK_H
#define YARP_OS_API
Definition: api.h:19
The main, catch-all namespace for YARP.
Definition: numeric.h:47
double now()
Return the current time in seconds, relative to an arbitrary starting point.
Definition: Time.cpp:121
void delay(double seconds)
Wait for a certain number of seconds.
Definition: Time.cpp:111
bool isValid()
Check if time is valid (non-zero).
Definition: Time.cpp:309