bitburner-src/doc/source/netscript/basicfunctions/sleep.rst

16 lines
307 B
ReStructuredText
Raw Normal View History

sleep() Netscript Function
==========================
.. js:function:: sleep([n = 0])
:RAM cost: 0 GB
2021-03-12 08:51:56 +01:00
:param number n: Number of milliseconds to sleep
Suspends the script for n milliseconds.
2021-03-12 08:51:56 +01:00
Example:
.. code-block:: javascript
2023-01-06 13:43:09 +01:00
await ns.sleep(3000); // Will wait 3 seconds.