spec.benchmarks.scimark.utils
Class Stopwatch

java.lang.Object
  extended by spec.benchmarks.scimark.utils.Stopwatch

public class Stopwatch
extends java.lang.Object

Provides a stopwatch to measure elapsed time.

Example of use:

 Stopwatch Q = new Stopwatch;
 

Q.start(); // // code to be timed here ... // Q.stop(); System.out.println("elapsed time was: " + Q.read() + " seconds.");

Version:
14 October 1997, revised 1999-04-24
Author:
Roldan Pozo

Constructor Summary
Stopwatch()
           
 
Method Summary
 double read()
          Display the elapsed time (in seconds)
 void reset()
          Return system time (in seconds)
 void resume()
          Resume timing, after stopping.
static double seconds()
          Return system time (in seconds)
 void start()
          Start (and reset) timer
 double stop()
          Stop timer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stopwatch

public Stopwatch()
Method Detail

seconds

public static final double seconds()
Return system time (in seconds)


reset

public void reset()
Return system time (in seconds)


start

public void start()
Start (and reset) timer


resume

public void resume()
Resume timing, after stopping. (Does not wipe out accumulated times.)


stop

public double stop()
Stop timer


read

public double read()
Display the elapsed time (in seconds)