YARP
Yet Another Robot Platform
NetworkClock.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2006-2020 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_NETWORKCLOCK_H
10
#define YARP_OS_NETWORKCLOCK_H
11
12
#include <
yarp/os/api.h
>
13
14
#include <
yarp/os/Clock.h
>
15
16
#include <string>
17
18
namespace
yarp
{
19
namespace
os {
20
21
class
YARP_os_API
NetworkClock
:
public
Clock
22
{
23
public
:
24
NetworkClock
();
25
virtual
~
NetworkClock
();
26
27
bool
open(
const
std::string& clockSourcePortName, std::string localPortName =
""
);
28
29
double
now
()
override
;
30
void
delay
(
double
seconds)
override
;
31
bool
isValid
()
const override
;
32
33
#ifndef DOXYGEN_SHOULD_SKIP_THIS
34
private
:
35
class
Private
;
36
Private
* mPriv;
37
#endif // DOXYGEN_SHOULD_SKIP_THIS
38
};
39
40
}
// namespace os
41
}
// namespace yarp
42
43
44
#endif // YARP_OS_NETWORKCLOCK_H
yarp::os::Time::isValid
bool isValid()
Check if time is valid (non-zero).
Definition:
Time.cpp:317
yarp::os::Clock
Definition:
Clock.h:18
api.h
yarp::os::NetworkClock::Private
Definition:
NetworkClock.cpp:39
YARP_os_API
#define YARP_os_API
Definition:
api.h:19
yarp::os::Time::now
double now()
Return the current time in seconds, relative to an arbitrary starting point.
Definition:
Time.cpp:124
Clock.h
yarp::os::NetworkClock
Definition:
NetworkClock.h:22
yarp
The main, catch-all namespace for YARP.
Definition:
environment.h:18
yarp::os::Time::delay
void delay(double seconds)
Wait for a certain number of seconds.
Definition:
Time.cpp:114
YARP
3.4.100+20201223.2+gitb8ea4d712
src
libYARP_os
src
yarp
os
NetworkClock.h
Generated on Sun Jan 3 2021 02:46:25 for YARP by
1.8.20