Package org.deepjava.runtime.mpc555
Class Timer
- java.lang.Object
-
- org.deepjava.runtime.mpc555.Timer
-
public class Timer extends Object
A class to measure a time span. The resolution will be in ms.- Author:
- 18.12.2009 simon.pertschy@ntb.ch
-
-
Constructor Summary
Constructors Constructor Description Timer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
expired()
Returnstrue
if the time is expired.void
reset()
Reset the timer.void
set(int ms)
Set the time to measure.void
stop()
Stop the timer.
-
-
-
Method Detail
-
set
public void set(int ms)
Set the time to measure.- Parameters:
ms
- the time in milliseconds
-
reset
public void reset()
Reset the timer. This call only works if the timer has not been expired.
-
stop
public void stop()
Stop the timer.
-
expired
public boolean expired()
Returnstrue
if the time is expired.false
otherwise.- Returns:
true
if the time is expired.
-
-