Timers: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
Line 8: | Line 8: | ||
;CAverageTimeMarker class:This class is a counter that iterates the CAverageCycleCounter specified in the constructor. | ;CAverageTimeMarker class:This class is a counter that iterates the CAverageCycleCounter specified in the constructor. | ||
;PROFILE_SCOPE(name):This is a simple tool to support timing a block of code, and reporting the results on program exit. | ;PROFILE_SCOPE(name):This is a simple tool to support timing a block of code, and reporting the results on program exit. | ||
==UTIL Shared Timer== | |||
'''File:''' <code>src\game_shared\util_shared.h</code> | |||
;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 <code>Start</code> function. | |||
[[Category:Helpers]] | [[Category:Helpers]] |
Revision as of 23:40, 14 January 2006
Tier0 Fast Timer
File: src\public\tier0\fasttimer.h
- 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
Start
andStop
. It should be initialized as a nonpointer object. - CTimeScope class
- This class calls the
Start
andEnd
functions of a CFastTimer specified in the constructor. TheStart
andEnd
functions 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.
- PROFILE_SCOPE(name)
- This is a simple tool to support timing a block of code, and reporting the results on program exit.
File: src\game_shared\util_shared.h
- 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
Start
function.