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

Method OnStateChange

library/PluginManager.cpp:1060–1071  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1058}
1059
1060void PluginManager::OnStateChange(color_ostream &out, state_change_event event)
1061{
1062 auto &core = Core::getInstance();
1063 auto &counters = core.perf_counters;
1064 for (auto it = begin(); it != end(); ++it) {
1065 auto & plugin_name = it->first;
1066 auto & plugin = it->second;
1067 uint32_t start_ms = core.p->getTickCount();
1068 plugin->on_state_change(out, event);
1069 counters.incCounter(counters.state_change_per_plugin[plugin_name], start_ms);
1070 }
1071}
1072
1073void PluginManager::registerCommands( Plugin * p )
1074{

Callers 1

onStateChangeMethod · 0.80

Calls 4

beginFunction · 0.85
getTickCountMethod · 0.80
on_state_changeMethod · 0.80
incCounterMethod · 0.80

Tested by

no test coverage detected