Function wait

Waits for the specified amount of time and then invokes the callback function.

  • Parameters

    • time: number

      The amount of time to wait in milliseconds.

    • cb: (() => void)

      The callback function to invoke after the specified time has elapsed.

        • (): void
        • Returns void

    Returns Promise<void>