Class TaskSchedule.FixedDelay

  • Enclosing class:
    TaskSchedule

    public static class TaskSchedule.FixedDelay
    extends TaskSchedule
    Schedule for a task that should be run immediately and then repeated indefinitely after the specified delay. This means that each run is started "delay" milliseconds after the previous run ended. The device may decide to run a task after a longer delay than specified to save energy.
    • Constructor Detail

      • FixedDelay

        public FixedDelay​(long delay)
        Constructs a new fixed delay schedule.
        Parameters:
        delay - the delay in milliseconds
    • Method Detail

      • getDelay

        public long getDelay()
        Returns the delay in milliseconds.
        Returns:
        the delay in milliseconds