MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / BeginResolve

Method BeginResolve

src/newgrf_profiling.cpp:48–58  ·  view source on GitHub ↗

* Capture the start of a sprite group resolution. * @param resolver Data about sprite group being resolved */

Source from the content-addressed store, hash-verified

46 * @param resolver Data about sprite group being resolved
47 */
48void NewGRFProfiler::BeginResolve(const ResolverObject &resolver)
49{
50 using namespace std::chrono;
51 this->cur_call.root_sprite = resolver.root_spritegroup->nfo_line;
52 this->cur_call.subs = 0;
53 this->cur_call.time = (uint32_t)time_point_cast<microseconds>(high_resolution_clock::now()).time_since_epoch().count();
54 this->cur_call.tick = TimerGameTick::counter;
55 this->cur_call.cb = resolver.callback;
56 this->cur_call.feat = resolver.GetFeature();
57 this->cur_call.item = resolver.GetDebugID();
58}
59
60/**
61 * Capture the completion of a sprite group resolution.

Callers 1

ResolveMethod · 0.80

Calls 4

nowClass · 0.85
countMethod · 0.45
GetFeatureMethod · 0.45
GetDebugIDMethod · 0.45

Tested by

no test coverage detected