public class TimerEvent extends Object implements JibEvent
Timer events follow a specific TimerEvent.Timer through a TimerEvent.State.START, TimerEvent.State.LAP,
and TimerEvent.State.FINISHED states. The duration indicates the duration since the last TimerEvent dispatched for the TimerEvent.Timer.
Timers can also define a hierarchy.
| Modifier and Type | Class and Description |
|---|---|
static class |
TimerEvent.State
The state of the timing.
|
static interface |
TimerEvent.Timer
Defines a timer hierarchy.
|
| Constructor and Description |
|---|
TimerEvent(TimerEvent.State state,
TimerEvent.Timer timer,
Duration duration,
Duration elapsed,
String description)
Creates a new
TimerEvent. |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Gets the description associated with this event.
|
Duration |
getDuration()
Gets the duration since the last
TimerEvent for this timer. |
Duration |
getElapsed()
Gets the total elapsed duration since this timer was created.
|
TimerEvent.State |
getState()
Gets the state of the timer.
|
TimerEvent.Timer |
getTimer()
Gets the timer this event is for.
|
public TimerEvent(TimerEvent.State state, TimerEvent.Timer timer, Duration duration, Duration elapsed, String description)
TimerEvent. For internal use only.state - the state of the TimerEvent.Timertimer - the TimerEvent.Timerduration - the lap durationelapsed - the total elapsed time since the timer was createddescription - the description of this eventpublic TimerEvent.State getState()
TimerEvent.Statepublic TimerEvent.Timer getTimer()
public Duration getDuration()
TimerEvent for this timer.TimerEvent for this timer.public Duration getElapsed()
public String getDescription()
Copyright © 2019. All rights reserved.