2019-03-03 04:08:54 +01:00
|
|
|
getGrowTime() Netscript Function
|
|
|
|
================================
|
|
|
|
|
2021-03-12 08:51:56 +01:00
|
|
|
.. js:function:: getGrowTime(hostname[, hackLvl=current level])
|
2019-03-03 04:08:54 +01:00
|
|
|
|
|
|
|
:RAM cost: 0.05 GB
|
|
|
|
|
2021-03-12 08:51:56 +01:00
|
|
|
: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.
|
2019-03-03 04:08:54 +01:00
|
|
|
|
2021-03-12 08:51:56 +01:00
|
|
|
The function takes in an optional ``hackLvl`` parameter that can be
|
|
|
|
specified to see what the grow time would be at different hacking levels.
|
2019-07-14 05:55:58 +02:00
|
|
|
|
2021-03-12 08:51:56 +01:00
|
|
|
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``.
|