<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [asleep](./bitburner.ns.asleep.md)

## NS.asleep() method

Suspends the script for n milliseconds. Doesn't block with concurrent calls.

**Signature:**

```typescript
asleep(millis?: number): Promise<true>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  millis | number | _(Optional)_ Number of milliseconds to sleep. Default to 0. |

**Returns:**

Promise&lt;true&gt;

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.

