From Valve Developer Community
Tier0 Fast Timer
- CFastTimer class
- The functions contained in this class are quick to maximize timer accuracy. The timer can be started and ended with the member functions
Stop. It should be initialized as a nonpointer object.
- CTimeScope class
- This class calls the
Endfunctions of a CFastTimer specified in the constructor. The
Endfunctions are called in the constructor and destructor respectively.
- CTimeAdder class
- This class manages a member CFastTimer and adds the ending duration to a CCycleCount object specified in the constructor.
- CLimitTimer class
- Use this class to time whether a desired interval of time has passed.
- CAverageCycleCounter class
- This class manages an average time covered.
- CAverageTimeMarker class
- This class is a counter that iterates the CAverageCycleCounter specified in the constructor.
- This is a simple tool to support timing a block of code, and reporting the results on program exit.
- IntervalTimer class
- This is a simple class for tracking intervals of game time. Upon creation, the timer is invalidated. To measure time intervals, start the timer via the
- CountdownTimer class
- This is a simple class for counting down a short interval of time. Upon creation, the timer is invalidated. Invalidated countdown timers are considered to have elapsed.
Client TimedEvent class
This class triggers events at a specified rate. What it does is help manage a specific event over time.
- Embed a nonpointer TimedEvent object into a class.
- On creation, call the object's Init function specifying the rate.
- In the
Updatefunction of a clientside entity class, use the following loop:
float tempDelta = fTimeDelta; while( m_ParticleSpawn.NextEvent( tempDelta ) )
To do: complete