Home | Features | Roadmap | Learn | Documentation | ||
Latest version: Tramway SDK 0.0.9 Github Quick links Home Get Started |
StatisticsThe statistics system collects data. There are two different types of data. The first type is time. Each System gets its own time counter. Systems can add time spent in themselves to the counter. The second type is the counter counter. It provides arbitrary counting services. For example, the Render system uses this service to count up an approximation of how much GPU memory it is using. Programming in C++
For the timings, somewhere in your main loop you need to add a call to the collate function.
// main loop
After that, you can start counting stuff.
system_t frog_system = System::Register("frog");
Finally, you can retrieve your counts.
size_t frogs = Stats::GetStat(RESOURCE_FROG);
|
|
|