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 booleanexpired()Returnstrueif the time is expired.voidreset()Reset the timer.voidset(int ms)Set the time to measure.voidstop()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()
Returnstrueif the time is expired.falseotherwise.- Returns:
trueif the time is expired.
-
-