From f5e82bc7f405f3e0990529de91b00683881cccc4 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 27 Apr 2003 08:13:45 +0000 Subject: [PATCH] Moved microtime_diff() to moodlelib --- admin/cron.php | 6 ------ lib/moodlelib.php | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) 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: ?> -- 2.39.5