NSOA.context.remainingTime()
Use this function to determine how much time your script has remaining to execute (excluding wsapi call time) before it is terminated by Scripting Governance.
You can use this function to help you create more efficient scripts and also to take corrective action if a script is at risk of consuming excessive resources.
Parameters
-
(none)
Returns
-
Amount of time remaining allowed for the script to execute in milliseconds (excluding wsapi call time).
Tip:Always try to reduce the amount of time your scripts take to execute.
Units Limit
-
0 units
For more information, see Scripting Governance.
Since
-
October 18, 2014
Example
-
This example logs the amount of time remaining for the script to execute in milliseconds (excluding wsapi call time).
NSOA.meta.log('info', 'Remaining script time: ' + NSOA.context.remainingTime() + ' milliseconds');
See also NSOA.wsapi.remainingTime().
For more information see Scripting Governance.