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

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Gang](./bitburner.gang.md) &gt; [nextUpdate](./bitburner.gang.nextupdate.md)

## Gang.nextUpdate() method

Sleeps until the next Gang update has happened.

**Signature:**

```typescript
nextUpdate(): Promise<number>;
```
**Returns:**

Promise&lt;number&gt;

Promise that resolves to the number of milliseconds of Gang time that were processed in the previous update (2000 - 5000 ms).

## Remarks

RAM cost: 1 GB

The amount of real time spent asleep between updates can vary due to "bonus time".

## Example


```js
while (true) {
  const duration = await ns.gang.nextUpdate();
  ns.print(`Gang completed ${ns.tFormat(duration)} of activity.`);
  ns.print(`Bonus time remaining: ${ns.tFormat(ns.gang.getBonusTime())}`);
  // Manage the Gang
}
```

