OPtimer.h

OPtimer

  • ui64 TotalGametime
  • ui64 Elapsed
  • LARGE_INTEGER TimeLastTick
  • LARGE_INTEGER Frequency
Struct definitions */
Time measurment object.
The OPtimer struct is responsible for keeping track of
time elapsed between ticks, and total time over all updates.

Globals

Functions

  • OPint OPtimerInit ( OPtimer* timer )
OPtimerInit - creates an OPtimer instance
Allocates space and initializes an OPtimer struct, then returns a
pointer to the allocated memory segment. If allocation fails, a NULL
pointer is returned.
  • void OPtimerTick ( OPtimer* timer )
OPtimerTick - updates a OPtimer
Updates an OPtimer instance with updated internal values representing
time at the moment of the call. This function will not check to see
if the OPtimer pointer is null before operating on it.
  • OPfloat OPtimerDelta ( OPtimer* timer )
OPtimerDelta - returns real time between ticks.
Acts as a getter for the appropriate internal values of the provided
OPtimer instance. The float value retuned is as a measurment in
milliseconds since the last call to OPtimerTick(). This function will
not check to see if the OPtimer pointer is null before operating on it.
  • ui64 OPtimerTotal ( OPtimer* timer )
OPtimerTotal - milliseconds since the timer's creation
Acts as a getter for the appropriate internal values of the provided
OPtimer instance. The unsigned integer value retuned is as a truncated
measurment of total milliseconds from the first call to OPtimerTick()
to the most recent call. This function will not check to see if the
OPtimer pointer is null before operating on it.