diff options
author | Urban Müller | 2012-11-28 16:19:02 +0000 |
---|---|---|
committer | Urban Müller | 2012-11-28 16:19:02 +0000 |
commit | 28d622fd07ed7d962f6827a3e07219e0bde7925e (patch) | |
tree | c6778688444a5d6bb68cc53bfe4eb1d998a7c0eb | |
parent | f2b67a9e76e5e17724aecd6a86cee224852dc877 (diff) | |
download | itools-28d622fd07ed7d962f6827a3e07219e0bde7925e.tar.gz itools-28d622fd07ed7d962f6827a3e07219e0bde7925e.tar.bz2 itools-28d622fd07ed7d962f6827a3e07219e0bde7925e.zip |
kill ancient gettimeofday() usage
-rw-r--r-- | it.class | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; } |