diff options
author | Urban Müller | 2007-06-14 17:15:25 +0000 |
---|---|---|
committer | Urban Müller | 2007-06-14 17:15:25 +0000 |
commit | d382ff414092c1988e61df2464570eac2667fbf8 (patch) | |
tree | 7ae19e7fca3874c5950bb43ace60a08df33af6bd /it.class | |
parent | f22ab12b3799dcc36b76cb5ef43594675b131d28 (diff) | |
download | itools-d382ff414092c1988e61df2464570eac2667fbf8.tar.gz itools-d382ff414092c1988e61df2464570eac2667fbf8.tar.bz2 itools-d382ff414092c1988e61df2464570eac2667fbf8.zip |
add timings to exec log
Diffstat (limited to 'it.class')
-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) |