mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 14:28:36 +02:00
1017 B
1017 B
Home > bitburner > NS > asleep
NS.asleep() method
Suspends the script for n milliseconds. Doesn't block with concurrent calls.
Signature:
asleep(millis?: number): Promise<true>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
millis |
number |
(Optional) Number of milliseconds to sleep. Default to 0. |
Returns:
Promise<true>
A promise that resolves to true when the sleep is completed.
Remarks
RAM cost: 0 GB
Note that the actual delay may be longer than intended. For more information, please check https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout#delay.