mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +02:00
DOCUMENTATION: Fix wrong param/return type and clarify ns.sleep, ns.asleep, ns.singularity.exportGame (#2242)
This commit is contained in:
@@ -9,14 +9,14 @@ Suspends the script for n milliseconds.
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
sleep(millis: number): Promise<true>;
|
||||
sleep(millis?: number): Promise<true>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| millis | number | Number of milliseconds to sleep. |
|
||||
| millis | number | _(Optional)_ Number of milliseconds to sleep. Default to 0. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
@@ -28,6 +28,8 @@ A promise that resolves to true when the sleep is completed.
|
||||
|
||||
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.
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user