Tramway SDK
stats.h
Go to the documentation of this file.
1// TRAMWAY DRIFT AND DUNGEON EXPLORATION SIMULATOR 2022
2// All rights reserved.
3
4#ifndef TRAM_SDK_FRAMEWORK_STATS_H
5#define TRAM_SDK_FRAMEWORK_STATS_H
6
7#include <framework/system.h>
8
9#include <cstddef>
10
11namespace tram::Stats {
12
13enum Resource : uint32_t {
15};
16
17void Start(System::system_t system);
18void Stop(System::system_t system);
19
20void Add(Resource resource, size_t ammount);
21void Remove(Resource resource, size_t ammount);
22
23void Collate();
24
25size_t GetStat(Resource resource);
26double GetStat(System::system_t system);
27double GetStatAverage(System::system_t system);
29
30}
31
32#endif // TRAM_SDK_FRAMEWORK_STATS_H
Definition: resource.h:12
Definition: stats.cpp:12
void Collate()
Collates all of the time statistics.
Definition: stats.cpp:65
void Stop(System::system_t system)
Stops counting time spent on a system.
Definition: stats.cpp:42
Resource
Definition: stats.h:13
@ RESOURCE_VRAM
Definition: stats.h:14
void Start(System::system_t system)
Starts counting time spent on a system.
Definition: stats.cpp:31
size_t GetStat(Resource resource)
Returns the uncollated ammount of a resource.
Definition: stats.cpp:94
void Add(Resource resource, size_t ammount)
Adds an ammount of a resource.
Definition: stats.cpp:51
void Remove(Resource resource, size_t ammount)
Removes an ammount of a resource.
Definition: stats.cpp:58
double GetStatAverage(System::system_t system)
Definition: stats.cpp:111
double GetStatUncollated(System::system_t system)
Returns the uncollated time of a system.
Definition: stats.cpp:106
uint32_t system_t
Definition: system.h:11