MCPcopy Create free account
hub / github.com/3rdparty/libprocess / cancel

Method cancel

src/clock.cpp:302–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300
301
302bool Clock::cancel(const Timer& timer)
303{
304 bool canceled = false;
305 synchronized (timers_mutex) {
306 // Check if the timeout is still pending, and if so, erase it. In
307 // addition, erase an empty list if we just removed the last
308 // timeout.
309 Time time = timer.timeout().time();
310 if (timers->count(time) > 0) {
311 canceled = true;
312 (*timers)[time].remove(timer);
313 if ((*timers)[time].empty()) {
314 timers->erase(time);
315 }
316 }
317 }
318
319 return canceled;
320}
321
322
323void Clock::pause()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected