| 263 | } |
| 264 | |
| 265 | bool Time::sleepUntil(const Time& end) { |
| 266 | if (Time::useSystemTime()) { |
| 267 | Duration d(end - Time::now()); |
| 268 | if (d > Duration(0)) { |
| 269 | return d.sleep(); |
| 270 | } |
| 271 | |
| 272 | return true; |
| 273 | } else { |
| 274 | Time start = Time::now(); |
| 275 | while ((Time::now() < end)) { |
| 276 | okvis_nanosleep(0, 1000000); |
| 277 | if (Time::now() < start) { |
| 278 | return false; |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | return true; |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | bool WallTime::sleepUntil(const WallTime& end) { |
| 287 | WallDuration d(end - WallTime::now()); |
nothing calls this directly
no test coverage detected