| CRM64Pro GDK v0.16.0 A free cross-platform game development kit built on top of SDL 3.0

Loading...
Searching...
No Matches
CRM64Pro::Timer
Core modules » Timer

Timer class. More...

## Detailed Description

Timer class.

## Classes
struct | Stats

## Public Types
enum | eBenchMetric { BM_LATENCY = 0 , BM_THROUGHPUT = 1 }
| Benchmark metric direction. More...

## Public Member Functions
bool | info (Sint32 iMode=0) override
| Request Timer Interface information.
bool | init (eTimerState tsOpt=TS_INIT)
| Initialize the timer system.
bool | setRate (Uint16 iR, Uint16 iL)
| Set preferred Render and Logic Frame Rate.
Sint32 | getLFR () const
| Get the preferred Logic Frame Rate.
Sint32 | getRFR () const
| Get the preferred Render Frame Rate.
Uint32 | getCurrentRFR () const
| Get current Render Frame Rate during last recent second.
Uint32 | getCurrentLFR () const
| Get current Logic Frame Rate during last recent second.
float | getAverageRFR () const
| Get the average Render Frame Rate since the last timer init or reset.
float | getAverageLFR () const
| Get the average Logic Frame Rate since the last timer init or reset.
Uint32 | getRenderFrames () const
| Get total render frames since the last timer init or reset.
Uint32 | getLogicFrames () const
| Get total logic frames since the last timer init or reset.
float | getTime () const
| Get the execution time (in seconds) since the last timer init or reset.
Uint64 | getTicks () const
| Get the execution time (in milliseconds) since the last timer init or reset.
Uint64 | getTicksNow () const
| Get the execution time (in milliseconds) since the last timer init or reset.
Uint64 | getHiResTime () const
| Get the execution time (in nanoseconds) since the last timer init or reset.
Sint32 | benchCreate (const string &sName, Sint32 iRuns=0, const string &sUnit="ms", eBenchMetric eMetric=BM_LATENCY)
| Create a microbenchmark.
bool | benchStart (Sint32 idBench)
| Start a microbenchmark measurement cycle.
bool | benchStop (Sint32 idBench, Uint64 workAmount=1)
| Stop a microbenchmark measurement cycle.
bool | benchClose (Sint32 idBench)
| Close a microbenchmark.
bool | benchStats (Sint32 idBench, Stats &stats)
| Calculate the statistical analysis given the current measurements.
bool | benchInfo (Sint32 idBench)
| Display benchmark information to the default log.
bool | benchInfoEx (Sint32 idBench, const string &sTitle="Report")
| Generate HTML benchmark report for a single benchmark.
bool | benchInfoEx (const vector< Sint32 > &vBenchIds, const string &sTitle="Report")
| Generate HTML benchmark report for multiple benchmarks.

## Member Enumeration Documentation

## ◆ eBenchMetric

enum CRM64Pro::Timer::eBenchMetric

Benchmark metric direction.

Enumerator
BM_LATENCY | Lower is better (e.g., execution time in ms, ns).
BM_THROUGHPUT | Higher is better (e.g., ops/s, MB/s).