railo.runtime.timer
Class Stopwatch

java.lang.Object
  extended by railo.runtime.timer.Stopwatch
Direct Known Subclasses:
GlobalWatch

public class Stopwatch
extends Object

Implementation of a simple Stopwatch


Constructor Summary
Stopwatch()
           
 
Method Summary
 int count()
           
 void reset()
          resets the stopwatch
 void start()
          start the watch
 long stop()
          stops the watch
 long time()
           
 long totalTime()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stopwatch

public Stopwatch()
Method Detail

start

public void start()
start the watch


stop

public long stop()
stops the watch

Returns:
returns the current time or 0 if watch not was running

time

public long time()
Returns:
returns the current time or 0 if watch is not running

totalTime

public long totalTime()
Returns:
returns the total elapsed time

count

public int count()
Returns:
returns how many start and stop was making

reset

public void reset()
resets the stopwatch



Copyright © 2012 Railo