# parsl.utils.Timer

class parsl.utils.Timer(callback: Callable, *args: Any, interval: float | int = 5, name: str | None = None)

  This class will make a callback periodically, with a period specified by the interval parameter.

  This is based on the following logic :

      BEGIN (INTERVAL, THRESHOLD, callback) :
          start = current_time()

          while (current_time()-start < INTERVAL) :
               wait()
               break

          callback()

  __init__(callback: Callable, *args: Any, interval: float | int = 5, name: str | None = None) → None

    Initialize the Timer object. We start the timer thread here

    KWargs:

      - interval (int or float) : number of seconds between callback events

      - name (str) : a base name to use when naming the started thread

  Methods

  `__init__`(callback, *args[, interval, name]) | Initialize the Timer object.
  `close`([timeout]) | Merge the threads and terminate.
  `make_callback`() | Makes the callback and resets the timer.

  close(timeout: float | None = None) → None

    Merge the threads and terminate.

  make_callback() → None

    Makes the callback and resets the timer.