类 IntervalTask

    • 构造器详细资料

      • IntervalTask

        public IntervalTask​(Runnable runnable,
                            long interval,
                            long initialDelay)
        Create a new IntervalTask.
        参数:
        runnable - the underlying task to execute
        interval - how often in milliseconds the task should be executed
        initialDelay - initial delay before first execution of the task
      • IntervalTask

        public IntervalTask​(Runnable runnable,
                            long interval)
        Create a new IntervalTask with no initial delay.
        参数:
        runnable - the underlying task to execute
        interval - how often in milliseconds the task should be executed