Class GTimer


  • public class GTimer
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      GTimer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static GTimerMonitor scheduleRepeatingRunnable​(long delay, long period, java.lang.Runnable callback)
      Schedules a runnable for repeated execution after the specified delay.
      static GTimerMonitor scheduleRunnable​(long delay, java.lang.Runnable callback)
      Schedules a runnable for execution after the specified delay.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GTimer

        public GTimer()
    • Method Detail

      • scheduleRunnable

        public static GTimerMonitor scheduleRunnable​(long delay,
                                                     java.lang.Runnable callback)
        Schedules a runnable for execution after the specified delay.
        Parameters:
        delay - the time (in milliseconds) to wait before executing the runnable.
        callback - the runnable to be executed.
        Returns:
        a GTimerMonitor which allows the caller to cancel the timer and check its status.
      • scheduleRepeatingRunnable

        public static GTimerMonitor scheduleRepeatingRunnable​(long delay,
                                                              long period,
                                                              java.lang.Runnable callback)
        Schedules a runnable for repeated execution after the specified delay.
        Parameters:
        delay - the time (in milliseconds) to wait before executing the runnable.
        period - time in milliseconds between successive runnable executions.
        callback - the runnable to be executed.
        Returns:
        a GTimerMonitor which allows the caller to cancel the timer and check its status.