summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2012-11-28 16:19:02 +0000
committerUrban Müller2012-11-28 16:19:02 +0000
commit28d622fd07ed7d962f6827a3e07219e0bde7925e (patch)
treec6778688444a5d6bb68cc53bfe4eb1d998a7c0eb
parentf2b67a9e76e5e17724aecd6a86cee224852dc877 (diff)
downloaditools-28d622fd07ed7d962f6827a3e07219e0bde7925e.tar.gz
itools-28d622fd07ed7d962f6827a3e07219e0bde7925e.tar.bz2
itools-28d622fd07ed7d962f6827a3e07219e0bde7925e.zip
kill ancient gettimeofday() usage
-rw-r--r--it.class6
1 files changed, 2 insertions, 4 deletions
diff --git a/it.class b/it.class
index 7d96342..1104894 100644
--- a/it.class
+++ b/it.class
@@ -493,12 +493,10 @@ static function exec(/* $cmd, $values1 = array(), ... */)
$args = func_get_args();
$cmd = call_user_func_array('it::shell_command', $args);
- $s = gettimeofday();
+ $before = microtime(true);
$result = EDC('noexec') ? "" : (string)shell_exec($cmd);
- $e = gettimeofday();
- $msec= intval(($e['sec'] - $s['sec']) * 1000 + ($e['usec'] - $s['usec']) / 1000);
- @it::log('exec', "$msec\t$cmd");
+ @it::log('exec', round((microtime(true) - $before)*1000) . "\t$cmd");
return $result;
}