CRM64Pro GDK v0.11.0
A free cross-platform game development kit built on top of SDL 3.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
CRM64Pro::Timer

Timer class. More...

Inherits CRM64Pro::Base.

Classes

struct  Stats
 

Public Member Functions

Sint32 info (Sint32 iMode=0)
 Request Timer Interface information.
 
Sint32 init (eTimerState tsOpt=TS_INIT)
 Initialize the timer system.
 
Sint32 setRate (Uint16 iR, Uint16 iL)
 Set preferred Render and Logic Frame Rate.
 
Sint32 getLFR ()
 Get the preferred Logic Frame Rate.
 
Sint32 getRFR ()
 Get the preferred Render Frame Rate.
 
Uint32 getCurrentRFR ()
 Get current Render Frame Rate during last recent second.
 
Uint32 getCurrentLFR ()
 Get current Logic Frame Rate during last recent second.
 
float getAverageRFR ()
 Get the average Render Frame Rate since the last timer init or reset.
 
float getAverageLFR ()
 Get the average Logic Frame Rate since the last timer init or reset.
 
Uint32 getRenderFrames ()
 Get total render frames since the last timer init or reset.
 
Uint32 getLogicFrames ()
 Get total logic frames since the last timer init or reset.
 
float getTime ()
 Get the execution time (in seconds) since the last timer init or reset.
 
Uint64 getTicks ()
 Get the execution time (in milliseconds) since the last timer init or reset.
 
Uint64 getTicksNow ()
 Get the execution time (in milliseconds) since the last timer init or reset.
 
Uint64 getHiResTime ()
 Get the execution time (in nanoseconds) since the last timer init or reset.
 
Sint32 benchBegin (const string &sName, Sint32 iRuns=0)
 Create and begin a microbenchmark test.
 
Sint32 benchBegin (Sint32 idBench)
 Begin a microbenchmark test.
 
Sint32 benchEnd (Sint32 idBench)
 End a microbenchmark test.
 
Sint32 benchClose (Sint32 idBench)
 Close a microbenchmark test.
 
Sint32 benchStats (Sint32 idBench, Stats &stats)
 Calculate the statistical analysis given the current measurements.
 

Detailed Description

Timer class.