6 |
|
|
7 |
|
#include <foreach.hpp> |
8 |
|
#include <scopes.hpp> |
9 |
+ |
#include <timing.hpp> |
10 |
|
|
11 |
|
#include <iomanip> |
12 |
|
#include <iostream> |
176 |
|
responsesCondition.Signal(); |
177 |
|
} |
178 |
|
|
179 |
< |
next: ::usleep(10000); |
179 |
> |
next: Timing::NanoSleep(Timing::Time(0, 10000000)); |
180 |
|
} |
181 |
|
} |
182 |
|
|
193 |
|
while (responses.empty()) |
194 |
|
try |
195 |
|
{ |
196 |
< |
timeval when; |
196 |
< |
|
197 |
< |
::gettimeofday(&when, NULL); |
198 |
< |
|
199 |
< |
timespec wait; |
200 |
< |
|
201 |
< |
TIMEVAL_TO_TIMESPEC(&when, &wait); |
202 |
< |
|
203 |
< |
++wait.tv_sec; |
204 |
< |
|
205 |
< |
responsesCondition.Wait(wait); |
196 |
> |
responsesCondition.Wait(Timing::GetTimeOfDay() += 1); |
197 |
|
} |
198 |
|
catch (const Posix::Error &error) |
199 |
|
{ |