Initial Commit

This commit is contained in:
Grzegorz Budny 2020-03-23 21:41:45 +01:00
parent 2f897350bc
commit 9bd877b7fa
3 changed files with 139 additions and 0 deletions

View file

@ -0,0 +1,32 @@
# RouterOS Function
# Copyright (c) Grzegorz Budny
# Version 1.0
# Last update: 3/22/2020
# Measures script execution time
:global MeasureExecutionTime do={
:local timeDifferance;
:local startTime [/system clock get time];
/system script run $scriptName;
:local endTime [/system clock get time]
:set $timeDifferance ($endTime-$startTime);
:if($return) do={
:return $timeDifferance;
}\
else={
:put ("Script executed in : ".$timeDifferance);
}
:set $timeDifferance;
}
$MeasureExecutionTime scriptName=scriptName return=true;