• Enable the thread to sleep for a period of time. The maximum sleep time is 1 minute. If the sleep time exceeds the upper limit, an exception is thrown. Negative or zero periods will cause sleep to return immediately.

    Parameters

    • duration: number

      Sleep duration. The unit is millisecond.

    Returns void