mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-05 05:53:47 +01:00
ae15914efa
Unfortunately, I haven't used most of the specialty APIs yet, so I'm not intimately familiar with where their documentation might be wrong. I figured some fixes were better than no fixes, and I can always make more fixes later. Fixes #1023.
24 lines
787 B
ReStructuredText
24 lines
787 B
ReStructuredText
getGrowTime() Netscript Function
|
|
================================
|
|
|
|
.. js:function:: getGrowTime(hostname[, hackLvl=current level])
|
|
|
|
:RAM cost: 0.05 GB
|
|
|
|
:param string hostname: Hostname of target server.
|
|
:param number hackLvl: Optional hacking level for the calculation. Defaults
|
|
to player's current hacking level.
|
|
:returns: seconds it takes to execute :doc:`grow<grow>` on that server.
|
|
|
|
The function takes in an optional ``hackLvl`` parameter that can be
|
|
specified to see what the grow time would be at different hacking levels.
|
|
|
|
Example:
|
|
|
|
.. code-block:: javascript
|
|
|
|
getGrowTime("foodnstuff"); // returns: 53.4
|
|
|
|
.. note:: For Hacknet Servers (the upgraded version of a Hacknet Node), this function will
|
|
return ``Infinity``.
|