@yookue/ts-lang-utils
    Preparing search index...

    Function sleep

    • Sleeps current thread for a specified amount of time

      Parameters

      • microseconds: number = 1000

        the amount of time to sleep, in microseconds

      Returns Promise<void>

      a promise that could be resolved

      David Hsing

      sleep(200);
      sleep().then(() => {});