diff --git a/inc_functions.php b/inc_functions.php index 2c0dc83ab111c41db1e1800a2d95f52ae3bc2d1e..21fdab7c564a6a944e39209f9de58b54804d89de 100644 --- a/inc_functions.php +++ b/inc_functions.php @@ -67,18 +67,20 @@ function _exec($cmd): void { global $aCol; echo "$aCol[blue]cmd > $cmd$aCol[reset]\n"; + $iStart=microtime(true); exec("$cmd 2>&1", $aOut, $rc); - + $iEnd=microtime(true); if (!count($aOut)) { $aOut = ["-- no output --"]; } echo implode("\n", $aOut) . "\n"; + $sTime= "... ⏱️ Time: " . round($iEnd-$iStart, 3) . "s\n"; if ($rc != 0) { - echo "rc=$rc "; + echo "rc=$rc $sTime"; _abort("Error: Command failed. Aborting.", $rc); } - _ok(); + _ok($sTime); } function _mkdir(string $sMyDir): void