#include <test-helpers.hh>
|
| unsigned int | secs |
| |
| bool | started {false} |
| |
| struct timespec | t = {0, 0} |
| |
◆ Sleeper()
| Sleeper::Sleeper |
( |
unsigned int |
secs | ) |
|
|
explicit |
99{
100}
unsigned int secs
Definition test-helpers.hh:92
◆ operator()()
| bool Sleeper::operator() |
( |
| ) |
|
103{
104 if(!
started && 0 == clock_gettime(CLOCK_REALTIME, &
t))
105 {
107 return true;
108 }
109
110 struct timespec now = {0, 0};
111 if(0 == clock_gettime(CLOCK_REALTIME, &now))
112 {
113 if(now.tv_sec >
t.tv_sec +
secs)
114 {
115 return false;
116 }
117 }
118
119 return true;
120}
bool started
Definition test-helpers.hh:93
struct timespec t
Definition test-helpers.hh:94
◆ secs
| unsigned int Sleeper::secs |
|
private |
◆ started
| bool Sleeper::started {false} |
|
private |
| struct timespec Sleeper::t = {0, 0} |
|
private |
The documentation for this class was generated from the following files: