summaryrefslogtreecommitdiff
path: root/includes/bootstrap.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r--includes/bootstrap.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index ad0186d5d..192f28e1a 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -248,6 +248,7 @@ function timer_read($name) {
}
return $diff;
}
+ return $timers[$name]['time'];
}
/**
@@ -262,7 +263,12 @@ function timer_read($name) {
function timer_stop($name) {
global $timers;
- $timers[$name]['time'] = timer_read($name);
+ if (isset($timers[$name]['time'])) {
+ $timers[$name]['time'] += timer_read($name);
+ }
+ else {
+ $timers[$name]['time'] = timer_read($name);
+ }
unset($timers[$name]['start']);
return $timers[$name];