diff options
-rw-r--r-- | it.class | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -324,9 +324,14 @@ function exec(/* $cmd, $values1 = array(), ... */) $cmd = str_replace($tag, join(" ", $parts), $cmd); } - it::log('exec', $cmd); + $s = gettimeofday(); + $result = EDC('noexec') ? "" : (string)shell_exec($cmd); + $e = gettimeofday(); + $msec= intval(($e['sec'] - $s['sec']) * 1000 + ($e['usec'] - $s['usec']) / 1000); - return EDC('noexec') ? "" : (string)shell_exec($cmd); + it::log('exec', "$msec\t$cmd"); + + return $result; } function _exec_quotevalue($value) |