From 28d622fd07ed7d962f6827a3e07219e0bde7925e Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 28 Nov 2012 16:19:02 +0000 Subject: kill ancient gettimeofday() usage --- it.class | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'it.class') 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; } -- cgit v1.2.3