mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
Add some timing
This commit is contained in:
parent
56a4ed732a
commit
498d403283
@ -13,6 +13,14 @@
|
||||
|
||||
$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");
|
||||
|
||||
echo "<PRE>\n";
|
||||
@ -66,4 +74,7 @@
|
||||
|
||||
echo "Cron script completed correctly\n";
|
||||
|
||||
$difftime = microtime_diff($starttime, microtime());
|
||||
echo "Execution took ".$difftime." seconds\n";
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user