| 288 | }; |
| 289 | |
| 290 | static void run_handler(color_ostream& out, EventType::EventType eventType, const EventHandler & handle, void * arg) { |
| 291 | auto &core = Core::getInstance(); |
| 292 | auto &counters = core.perf_counters; |
| 293 | uint32_t start_ms = core.p->getTickCount(); |
| 294 | const char * plugin_name = !handle.plugin ? "<null>" : handle.plugin->getName().c_str(); |
| 295 | handle.eventHandler(out, arg); |
| 296 | counters.incCounter(counters.event_manager_event_per_plugin_ms[eventType][plugin_name], start_ms); |
| 297 | } |
| 298 | |
| 299 | void DFHack::EventManager::onStateChange(color_ostream& out, state_change_event event) { |
| 300 | static bool doOnce = false; |
no test coverage detected