MCPcopy Create free account
hub / github.com/DFHack/dfhack / run_handler

Function run_handler

library/modules/EventManager.cpp:290–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288};
289
290static 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
299void DFHack::EventManager::onStateChange(color_ostream& out, state_change_event event) {
300 static bool doOnce = false;

Callers 15

onStateChangeMethod · 0.85
manageTickEventFunction · 0.85
manageJobInitiatedEventFunction · 0.85
manageJobStartedEventFunction · 0.85
manageJobCompletedEventFunction · 0.85
manageNewUnitActiveEventFunction · 0.85
manageUnitDeathEventFunction · 0.85
manageItemCreationEventFunction · 0.85
manageBuildingEventFunction · 0.85
manageConstructionEventFunction · 0.85
manageSyndromeEventFunction · 0.85
manageInvasionEventFunction · 0.85

Calls 4

getTickCountMethod · 0.80
c_strMethod · 0.80
incCounterMethod · 0.80
getNameMethod · 0.45

Tested by

no test coverage detected