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

Function ktimer

plugins/devel/kittens.cpp:194–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194command_result ktimer (color_ostream &out, vector <string> & parameters)
195{
196 bool is_running = timering.exchange(false);
197 if(is_running)
198 {
199 return CR_OK;
200 }
201 uint64_t timestart = GetTimeMs64();
202 {
203 uint64_t timeend = GetTimeMs64();
204 timeLast = timeend;
205 timering = true;
206 out.print("Time to suspend = {} ms\n", int(timeend - timestart));
207 }
208 is_enabled = true;
209 return CR_OK;
210}
211
212struct Connected;
213using shared = std::shared_ptr<Connected>;

Callers

nothing calls this directly

Calls 2

GetTimeMs64Function · 0.85
printMethod · 0.45

Tested by

no test coverage detected