This commit is contained in:
Glenn Maynard
2005-02-13 03:05:19 +00:00
parent 3380df27cd
commit fa32951449
7 changed files with 44 additions and 45 deletions
+21
View File
@@ -1,3 +1,24 @@
/*
* This can be used in two ways: as a timestamp or as a timer.
*
* As a timer,
* RageTimer Timer;
* while(1) {
* printf( "Will be approximately: %f", Timer.PeekDeltaTime()) ;
* float fDeltaTime = Timer.GetDeltaTime();
* }
*
* or as a timestamp:
* void foo( RageTimer &timestamp ) {
* if( timestamp.IsZero() )
* printf( "The timestamp isn't set." );
* else
* printf( "The timestamp happened %f ago", timestamp.Ago() );
* timestamp.Touch();
* printf( "Near zero: %f", timestamp.Age() );
* }
*/
#include "global.h"
#include "RageTimer.h"