Class Timer

  • All Implemented Interfaces:
    SafeDisposable

    public class Timer
    extends SoSystemTimer
    Implementation of SoSystemTimer for SWT application.
    • Constructor Detail

      • Timer

        public Timer()
    • Method Detail

      • start

        public void start()
        Description copied from class: SoSystemTimer
        Start the timer. If it is already started, stop it and restart
        Overrides:
        start in class SoSystemTimer
      • setDelay

        public void setDelay​(int time)
        Description copied from class: SoSystemTimer
        Set the timer's timeout in milliseconds.
        Overrides:
        setDelay in class SoSystemTimer
      • setRepeat

        public void setRepeat​(boolean flag)
        Description copied from class: SoSystemTimer
        If set to true, the timer will be triggered periodically at the rate defined by setDelay.
        Overrides:
        setRepeat in class SoSystemTimer
      • setTask

        public void setTask​(SoSystemTimerTask task)
        Description copied from class: SoSystemTimer
        Sets the task executed when the timer is triggered. When the timer is is triggered, it calls the run() method of task.
        Overrides:
        setTask in class SoSystemTimer