Interface ITimerTask

    • Method Detail

      • run

        void run​(long now)
          throws Exception
        This method is called by the DriftAwareThread at the end of each interval.
        Parameters:
        now - the current time
        Throws:
        Exception - if the task fails
      • callback

        long callback​(long duration,
                      long nextExecutionTime)
               throws Exception
        This method is called after the run(long) method to allow performance tracking.
        Parameters:
        duration - the duration of the last execution
        nextExecutionTime - the next calculated execution time
        Returns:
        the modified execution next time
        Throws:
        Exception - if the callback fails