From: moodler Date: Sun, 27 Apr 2003 08:13:45 +0000 (+0000) Subject: Moved microtime_diff() to moodlelib X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f5e82bc7f405f3e0990529de91b00683881cccc4;p=moodle.git Moved microtime_diff() to moodlelib --- diff --git a/admin/cron.php b/admin/cron.php index f41094bf1b..cf23da58dd 100644 --- a/admin/cron.php +++ b/admin/cron.php @@ -13,12 +13,6 @@ $FULLME = "cron"; - function microtime_diff($a, $b) { - list($a_dec, $a_sec) = explode(" ", $a); - list($b_dec, $b_sec) = explode(" ", $b); - return $b_sec - $a_sec + $b_dec - $a_dec; - } - $starttime = microtime(); require_once("../config.php"); diff --git a/lib/moodlelib.php b/lib/moodlelib.php index bfc626f1cb..eb667a14f9 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1376,6 +1376,12 @@ function draw_rand_array($array, $draws) { return $return; } +function microtime_diff($a, $b) { + list($a_dec, $a_sec) = explode(" ", $a); + list($b_dec, $b_sec) = explode(" ", $b); + return $b_sec - $a_sec + $b_dec - $a_dec; +} + // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140: ?>