mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
36 lines
791 B
Markdown
36 lines
791 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [bitburner](./bitburner.md) > [TIX](./bitburner.tix.md) > [nextUpdate](./bitburner.tix.nextupdate.md)
|
|
|
|
## TIX.nextUpdate() method
|
|
|
|
Sleep until the next Stock Market price update has happened.
|
|
|
|
**Signature:**
|
|
|
|
```typescript
|
|
nextUpdate(): Promise<number>;
|
|
```
|
|
**Returns:**
|
|
|
|
Promise<number>
|
|
|
|
Promise that resolves to the number of milliseconds of Stock Market time that were processed in the previous update (always 6000 ms).
|
|
|
|
## Remarks
|
|
|
|
RAM cost: 1 GB
|
|
|
|
The amount of real time spent asleep between updates can vary due to "bonus time" (usually 4 seconds - 6 seconds).
|
|
|
|
## Example
|
|
|
|
|
|
```js
|
|
while (true) {
|
|
await ns.stock.nextUpdate();
|
|
// Manage your stock portfolio
|
|
}
|
|
```
|
|
|