laser.util
Class WallClockTimer

java.lang.Object
  extended by laser.util.WallClockTimer

public class WallClockTimer
extends java.lang.Object

A simple class for doing wall clock timing in Java programs.

Author:
Jamieson M. Cobleigh (laser-software@cs.umass.edu)

Constructor Summary
WallClockTimer(java.lang.String msg)
          Creates a new timer with a given message
 
Method Summary
 void start()
          Starts the timer, printing an error message if it has already started.
 void stop()
          Stops the timer, printing an error message if it has already been stopped or if it wasn't started
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WallClockTimer

public WallClockTimer(java.lang.String msg)
Creates a new timer with a given message

Parameters:
msg - the message describing what the timer is timing

Method Detail

start

public void start()
Starts the timer, printing an error message if it has already started.


stop

public void stop()
Stops the timer, printing an error message if it has already been stopped or if it wasn't started