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

Method finalize

src/clock.cpp:212–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210
211
212void Clock::finalize()
213{
214 // We keep track of state differently when the clock is paused.
215 // Finalization only handles cleanup of a running clock.
216 CHECK(!clock::paused) << "Clock must not be paused when finalizing";
217
218 synchronized (timers_mutex) {
219 // NOTE: `currents` is only non-empty when the clock is paused.
220
221 // This, along with the `timers_mutex`, is all that is required to clean
222 // up any pending timers. Timers are triggered via "ticks". However,
223 // we do not need to clear `ticks` because a "tick" with an empty `timers`
224 // map will effectively be a no-op.
225 timers->clear();
226 }
227}
228
229
230Time Clock::now()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected