diff --git a/markdown/bitburner.ns.spawn.md b/markdown/bitburner.ns.spawn.md index 90d92a9e7..7c9803a0c 100644 --- a/markdown/bitburner.ns.spawn.md +++ b/markdown/bitburner.ns.spawn.md @@ -17,7 +17,7 @@ spawn(script: string, threadOrOptions?: number | SpawnOptions, ...args: (string | Parameter | Type | Description | | --- | --- | --- | | script | string | Filename of script to execute. | -| threadOrOptions | number \| [SpawnOptions](./bitburner.spawnoptions.md) | _(Optional)_ Either an integer number of threads for new script, or a [SpawnOptions](./bitburner.spawnoptions.md) object. Threads defaults to 1. | +| threadOrOptions | number \| [SpawnOptions](./bitburner.spawnoptions.md) | _(Optional)_ Either an integer number of threads for new script, or a [SpawnOptions](./bitburner.spawnoptions.md) object. Threads defaults to 1 and spawnDelay defaults to 10,000 ms. | | args | (string \| number \| boolean)\[\] | Additional arguments to pass into the new script that is being run. | **Returns:** @@ -39,6 +39,6 @@ Running this function with 0 or fewer threads will cause a runtime error. ```js //The following example will execute the script ‘foo.js’ with 10 threads, in 500 milliseconds and the arguments ‘foodnstuff’ and 90: -ns.spawn('foo.js', 10, 500, 'foodnstuff', 90); +ns.spawn('foo.js', {threads: 10, spawnDelay: 500}, 'foodnstuff', 90); ``` diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 99c2692a3..2585a22cf 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -6054,10 +6054,10 @@ export interface NS { * @example * ```js * //The following example will execute the script ‘foo.js’ with 10 threads, in 500 milliseconds and the arguments ‘foodnstuff’ and 90: - * ns.spawn('foo.js', 10, 500, 'foodnstuff', 90); + * ns.spawn('foo.js', {threads: 10, spawnDelay: 500}, 'foodnstuff', 90); * ``` * @param script - Filename of script to execute. - * @param threadOrOptions - Either an integer number of threads for new script, or a {@link SpawnOptions} object. Threads defaults to 1. + * @param threadOrOptions - Either an integer number of threads for new script, or a {@link SpawnOptions} object. Threads defaults to 1 and spawnDelay defaults to 10,000 ms. * @param args - Additional arguments to pass into the new script that is being run. */ spawn(script: string, threadOrOptions?: number | SpawnOptions, ...args: (string | number | boolean)[]): void;