mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-29 17:37:34 +01:00
38 lines
993 B
Markdown
38 lines
993 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [Bladeburner](./bitburner.bladeburner.md) > [nextUpdate](./bitburner.bladeburner.nextupdate.md)
|
|
|
|
## Bladeburner.nextUpdate() method
|
|
|
|
Sleep until the next Bladeburner update has happened.
|
|
|
|
**Signature:**
|
|
|
|
```typescript
|
|
nextUpdate(): Promise<number>;
|
|
```
|
|
**Returns:**
|
|
|
|
Promise<number>
|
|
|
|
Promise that resolves to the number of milliseconds of Bladeburner time that were processed in the previous update (1000 - 5000 ms).
|
|
|
|
## Remarks
|
|
|
|
RAM cost: 1 GB
|
|
|
|
The amount of real time spent asleep between updates can vary due to "bonus time" (usually 1 second).
|
|
|
|
## Example
|
|
|
|
|
|
```js
|
|
while (true) {
|
|
const duration = await ns.bladeburner.nextUpdate();
|
|
ns.print(`Bladeburner Division completed ${ns.tFormat(duration)} of actions.`);
|
|
ns.print(`Bonus time remaining: ${ns.tFormat(ns.bladeburner.getBonusTime())}`);
|
|
// Manage the Bladeburner division
|
|
}
|
|
```
|
|
|