All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jnt.util.Stopwatch

java.lang.Object
   |
   +----jnt.util.Stopwatch

public class Stopwatch
extends 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
Author:
Roldan Pozo

Constructor Index

 o Stopwatch()

Method Index

 o read()
Display the elapsed time (in seconds)
 o reset()
Return system time (in seconds)
 o resume()
Resume timer.
 o seconds()
Return system time (in seconds)
 o start()
Start (and reset) timer
 o stop()
Stop timer

Constructors

 o Stopwatch
 public Stopwatch()

Methods

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

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

 o resume
 public void resume()
Resume timer.

 o start
 public void start()
Start (and reset) timer

 o stop
 public double stop()
Stop timer

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


All Packages  Class Hierarchy  This Package  Previous  Next  Index