StopWatch Class
Implements a simple timer with methods to start the timer, and check to see how many seconds have passed since it was started.
Typical Usage
var stop_watch = new StopWatch();
stop_watch.start();
// ... time passes ...
if( stop_watch.secondsElapsed() > 10 ) {
// ... perform timeout processing ...
}
Constructor
StopWatch
()
Item Index
Methods
Methods
getClockTimeInMs
()
private
A wrapper provided for testing purposes. The client will not usually call this method directly.
secondsElapsed
()
Returns the number of seconds that have elapsed since the timer was started.
If start() was not previously called on the StopWatch object, an exception is thrown.
start
()
Start the StopWatch timer.