Class TimerEvent


  • public class TimerEvent
    extends java.lang.Object
    An event fired when a Timer 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 the Timer that posted this event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 event
        target - the object that was timed
        elapsedTime - the time elapsed in microseconds
    • Method Detail

      • getTimer

        public Timer getTimer()
        Gets the Timer 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.