lifecycle-utils
    Preparing search index...

    Function setLongTimeout

    • Sets a timeout that can also be set to a delay longer than the maximum timeout delay supported by a regular setTimeout. You can use clearLongTimeout to clear the timeout.

      For example,

      import {setLongTimeout, clearLongTimeout} from "lifecycle-utils";

      const month = 1000 * 60 * 60 * 24 * 7 * 30;

      const timeout = setLongTimeout(() => {
      console.log("timeout");
      }, month);

      // to clear the timeout, call clearLongTimeout
      // clearLongTimeout(timeout);

      Parameters

      • callback: () => void
      • delay: number

      Returns LongTimeout