Function asyncTimer

  • Helper to run async function periodically with the ability to preserve execution time

    Returns

    Function to dispose the timer

    Parameters

    • func: (() => Promise<void>)

      Async function to run periodically

        • (): Promise<void>
        • Returns Promise<void>

    • time: number

      Time between subsequent runs

    • preserveExecutionTime: boolean = true

      Should we exclude execution time from period time or not

    Returns (() => void)

      • (): void
      • Returns void

Generated using TypeDoc