jigcell.xpp
Class Stopwatch

java.lang.Object
  extended by jigcell.xpp.Stopwatch

public class Stopwatch
extends java.lang.Object

A class to help benchmark code It simulates a real stop watch


Field Summary
private static boolean running
           
private static long startTime
           
private static long stopTime
           
 
Constructor Summary
Stopwatch()
           
 
Method Summary
static long getElapsedTime()
          returns elapsed time in milliseconds if the watch has never been started then return zero
static void reset()
           
static void start()
           
static void stop()
           
static long tic()
          Get elapsed time and restart stopwatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startTime

private static long startTime

stopTime

private static long stopTime

running

private static boolean running
Constructor Detail

Stopwatch

public Stopwatch()
Method Detail

start

public static void start()

stop

public static void stop()

getElapsedTime

public static long getElapsedTime()
returns elapsed time in milliseconds if the watch has never been started then return zero


tic

public static long tic()
Get elapsed time and restart stopwatch

Returns:

reset

public static void reset()