org.mbari.siam.utils
Class StopWatch

java.lang.Object
  extended by org.mbari.siam.utils.StopWatch

public class StopWatch
extends java.lang.Object


Constructor Summary
StopWatch()
          Ceate a new StopWatch object.
StopWatch(boolean create_running)
          Ceate a new running StopWatch object.
 
Method Summary
 void clear()
          Clear the stopwatch
static void delay(int millisecs)
          Delay for the specified number milliseconds in the calling thread
 boolean isRunning()
          Find out if the stopwatch is currently keeping track of time
static void main(java.lang.String[] args)
           
 long read()
          Read the total amount of elapsed time the stopwatch has running
 long start()
          Start the stopwatch
 long stop()
          Stop the stopwatch
 void stopWatchTest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopWatch

public StopWatch()
Ceate a new StopWatch object. A StopWatch object acts as a stop watch that can be stopped and started multiple times during the life of the object. The stop watch will track the total amount time between starts and stops.


StopWatch

public StopWatch(boolean create_running)
Ceate a new running StopWatch object. If the create_running boolean is true the StopWatch object will be created running.

Method Detail

isRunning

public boolean isRunning()
Find out if the stopwatch is currently keeping track of time


clear

public void clear()
Clear the stopwatch


read

public long read()
Read the total amount of elapsed time the stopwatch has running


start

public long start()
Start the stopwatch


stop

public long stop()
Stop the stopwatch


delay

public static void delay(int millisecs)
Delay for the specified number milliseconds in the calling thread


main

public static void main(java.lang.String[] args)

stopWatchTest

public void stopWatchTest()


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.