Package edu.wpi.grip.core.events
Class TimerEvent
- java.lang.Object
-
- edu.wpi.grip.core.events.TimerEvent
-
public class TimerEvent extends java.lang.Object
An event fired when aTimer
finishes timing something.This contains:
- The timer posting the event
- The object being timed
- How long the timed action took, in microseconds
- Historical data about the action
-
-
Constructor Summary
Constructors Constructor Description TimerEvent(Timer timer, java.lang.Object target, long elapsedTime)
Creates a new timer event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getElapsedTime()
Gets the elapsed time of the action, in microseconds.java.lang.Object
getTarget()
Gets the target object that had an action being timed.Timer
getTimer()
Gets theTimer
that posted this event.
-
-
-
Constructor Detail
-
TimerEvent
public TimerEvent(Timer timer, java.lang.Object target, long elapsedTime)
Creates a new timer event.- Parameters:
timer
- the timer that posted this eventtarget
- the object that was timedelapsedTime
- the time elapsed in microseconds
-
-
Method Detail
-
getTimer
public Timer getTimer()
Gets theTimer
that posted this event.
-
getTarget
public java.lang.Object getTarget()
Gets the target object that had an action being timed.
-
getElapsedTime
public long getElapsedTime()
Gets the elapsed time of the action, in microseconds.
-
-