mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 14:59:16 +02:00
828 B
828 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.