de.goerntkai.toolbox.time
Interface Clock


public interface Clock

Measures elapsed time.

The moment Clock is instantiated it beginns counting. Every time getElapsedMillis is called it returns the time elapsed since instantiation in milliseconds. The clock does not stop counting so any subsequent call of getElapsedMillis returns the time elapsed since instantiation. If the start of a new counting is needed reset has to be called.

Version:
$Id: Clock.java,v 1.2 2007/04/29 17:54:04 GoerntKai Exp $
Author:
Kai Görnt

Method Summary
 long getElapsedMillis()
          Returns the elapsed time in milliseconds since the instantiation or the last reset().
 void reset()
          Resets the starting time.
 

Method Detail

getElapsedMillis

public long getElapsedMillis()

Returns the elapsed time in milliseconds since the instantiation or the last reset().

Returns:
elapsed milliseconds

reset

public void reset()

Resets the starting time.



Copyright © 2004-2007 Kai Görnt. All Rights Reserved.