Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
Related Functions
Files
File List
File Members
All
c
d
g
n
o
r
s
Functions
Macros
c
d
n
r
include
cras_cpp_common
time_utils
interruptible_sleep_interface.h
Go to the documentation of this file.
1
#pragma once
2
11
#include <memory>
12
13
#include <
ros/duration.h
>
14
15
namespace
cras
16
{
17
18
struct
InterruptibleSleepInterfacePrivate;
19
26
struct
InterruptibleSleepInterface
27
{
28
public
:
29
InterruptibleSleepInterface
();
30
34
virtual
~InterruptibleSleepInterface
();
35
41
virtual
bool
sleep
(const ::ros::Duration& duration)
const
;
42
49
virtual
bool
ok
()
const
;
50
51
protected
:
53
::ros::WallDuration
pollDuration
{0, 1000000};
54
55
private
:
57
::std::unique_ptr<InterruptibleSleepInterfacePrivate>
data
;
58
};
59
60
}
cras::InterruptibleSleepInterface::data
::std::unique_ptr< InterruptibleSleepInterfacePrivate > data
PIMPL data container.
Definition:
interruptible_sleep_interface.h:57
cras
Definition:
any.hpp:15
cras::InterruptibleSleepInterface::sleep
virtual bool sleep(const ::ros::Duration &duration) const
Sleep for the given duration or until ok() returns false.
cras::InterruptibleSleepInterface::pollDuration
::ros::WallDuration pollDuration
How long to wait between querying the ok() status and other conditions.
Definition:
interruptible_sleep_interface.h:53
duration.h
cras::InterruptibleSleepInterface
Interface to an object whose sleep() calls can be interrupted externally. Multiple sleep() calls can ...
Definition:
interruptible_sleep_interface.h:26
cras::InterruptibleSleepInterface::ok
virtual bool ok() const
Whether it is OK to continue sleeping. If false, a pending sleep() should stop as soon as possible.
ros::WallDuration
cras::InterruptibleSleepInterface::~InterruptibleSleepInterface
virtual ~InterruptibleSleepInterface()
Destroy the object waiting for a pending sleep() call to finish.
cras::InterruptibleSleepInterface::InterruptibleSleepInterface
InterruptibleSleepInterface()
cras_cpp_common
Author(s): Martin Pecka
autogenerated on Sun Mar 2 2025 03:50:52