| 210 | |
| 211 | |
| 212 | void 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 | |
| 230 | Time Clock::now() |
nothing calls this directly
no outgoing calls
no test coverage detected