de.twenty11.unitprofile.domain
Class Clock
java.lang.Object
de.twenty11.unitprofile.domain.Clock
public class Clock
- extends Object
clock implementation to keep track of durations
|
Constructor Summary |
Clock()
creates and starts a clock. |
Clock
public Clock()
- creates and starts a clock.
stop
public void stop()
- stops the clock
getStart
public long getStart()
getEnd
public long getEnd()
- Returns:
- current time if not stopped yet; otherwise time when stop method was called.
isStopped
public boolean isStopped()
- Returns:
- has the clock been stopped
getElapsed
public long getElapsed()
- Returns:
- time elapsed since starting (when not stopped yet); otherwise total elapsed time between creation and call of stop method.
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2013. All rights reserved.