AgateLib.Timing.Timing.StopWatch Class Reference

Class which represents a StopWatch. A StopWatch can be paused and reset independently of other StopWatches. More...

List of all members.

Public Member Functions

 StopWatch ()
 Constructs a timer object, and immediately begins keeping track of time.
 StopWatch (bool autostart)
 Constructs a timer object. If the timer starts paused, a call to Resume() must be made for it to begin keeping track of time.
void Dispose ()
 Destroys this timer.
void Reset ()
 Resets the timer to zero.
void Pause ()
 Increments the pause counter. If the counter is greater than zero, the timer won't advance.
void Resume ()
 Decrements the pause counter. If the pause counter is zero the timer will begin advancing.
void ForceResume ()
 Sets the pause counter to zero, causing the timer to begin advancing regardless of how many calls to Pause() are made.

Protected Member Functions

virtual void Dispose (bool manual)
 Removes this timer from events.

Properties

double TotalSeconds [get]
 Returns the number of seconds since the timer started.
double TotalMilliseconds [get]
 Returns the number of ticks (milliseconds) since the timer started.
bool IsPaused [get]
 Gets whether or not this StopWatch is paused.


Detailed Description

Class which represents a StopWatch. A StopWatch can be paused and reset independently of other StopWatches.


Constructor & Destructor Documentation

AgateLib.Timing.Timing.StopWatch.StopWatch (  ) 

Constructs a timer object, and immediately begins keeping track of time.

AgateLib.Timing.Timing.StopWatch.StopWatch ( bool  autostart  ) 

Constructs a timer object. If the timer starts paused, a call to Resume() must be made for it to begin keeping track of time.

Parameters:
autostart Pass true to immediately begin keeping track of time. False to pause the timer initially.


Member Function Documentation

virtual void AgateLib.Timing.Timing.StopWatch.Dispose ( bool  manual  )  [protected, virtual]

Removes this timer from events.

Parameters:
manual 

void AgateLib.Timing.Timing.StopWatch.Dispose (  ) 

Destroys this timer.

void AgateLib.Timing.Timing.StopWatch.ForceResume (  ) 

Sets the pause counter to zero, causing the timer to begin advancing regardless of how many calls to Pause() are made.

void AgateLib.Timing.Timing.StopWatch.Pause (  ) 

Increments the pause counter. If the counter is greater than zero, the timer won't advance.

void AgateLib.Timing.Timing.StopWatch.Reset (  ) 

Resets the timer to zero.

void AgateLib.Timing.Timing.StopWatch.Resume (  ) 

Decrements the pause counter. If the pause counter is zero the timer will begin advancing.


Property Documentation

bool AgateLib.Timing.Timing.StopWatch.IsPaused [get]

Gets whether or not this StopWatch is paused.

double AgateLib.Timing.Timing.StopWatch.TotalMilliseconds [get]

Returns the number of ticks (milliseconds) since the timer started.

double AgateLib.Timing.Timing.StopWatch.TotalSeconds [get]

Returns the number of seconds since the timer started.


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo