From d382ff414092c1988e61df2464570eac2667fbf8 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 14 Jun 2007 17:15:25 +0000 Subject: add timings to exec log --- it.class | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/it.class b/it.class index ae4bc87..ea8f0b1 100644 --- a/it.class +++ b/it.class @@ -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) -- cgit v1.2.3