simple.time
Class Timer

java.lang.Object
  extended by simple.time.Timer

public class Timer
extends java.lang.Object

Simple timer.
Created: Nov 9, 2010

Author:
Kenneth Pierce

Field Summary
private  long t
           
 
Constructor Summary
Timer()
           
 
Method Summary
 long elapsed()
          Subtracts the start time from the current time.
 void print(java.lang.String s)
          Displays the elapsed time on the standard system output stream.
 void reset()
          Sets the start time to the current time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

t

private long t
Constructor Detail

Timer

public Timer()
Method Detail

reset

public void reset()
Sets the start time to the current time.


elapsed

public long elapsed()
Subtracts the start time from the current time.

Returns:
The time elapsed since the start time in milliseconds.

print

public void print(java.lang.String s)
Displays the elapsed time on the standard system output stream.

Parameters:
s - String to display with elapsed time.