mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
993 B
993 B
Home > bitburner > Bladeburner > nextUpdate
Bladeburner.nextUpdate() method
Sleep until the next Bladeburner update has happened.
Signature:
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
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
}