libp2p
    Preparing search index...
    interface RepeatingTask {
        setInterval(ms: number): void;
        setTimeout(ms: number): void;
        start(): void;
        stop(): void;
    }
    Index

    Methods

    • Update the interval after which the next iteration of the task will run.

      This is useful if, for example, you want to retry a task with a short rest duration until it succeeds, then periodically after that.

      This only affects the next iteration of the task, if it is currently running, that run will not be interrupted.

      Setting the interval to the current value has no effect.

      Parameters

      • ms: number

      Returns void

    • Update the amount of time a task will run before the passed abort signal will fire.

      This only affects the next iteration of the task, if it is currently running, that run will not be interrupted.

      Parameters

      • ms: number

      Returns void