| 266 | } |
| 267 | |
| 268 | void trim() { |
| 269 | uint32_t unpaused_ms = Core::getInstance().getUnpausedMs(); |
| 270 | if (unpaused_ms < RECENT_UNIT_MS) |
| 271 | return; |
| 272 | uint32_t cutoff = unpaused_ms - RECENT_UNIT_MS; |
| 273 | for (auto it = units.begin(); it != units.end();) { |
| 274 | if (it->second < cutoff) |
| 275 | it = units.erase(it); |
| 276 | else |
| 277 | ++it; |
| 278 | } |
| 279 | } |
| 280 | } recent_units; |
| 281 | |
| 282 | static void on_new_active_unit(color_ostream& out, void* data) { |
no test coverage detected