aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/diagnostics
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-10-03 22:13:55 +0200
committerRobin Appelman <icewind@owncloud.com>2014-10-20 13:38:38 +0200
commit1e69f5e7ac3414f307aac16842655a34a2f3c709 (patch)
treecd6ac10cd7feafe424bd1abd6f3cd0a4e145af0e /lib/private/diagnostics
parent6e08014781ea0099d7e4466dd48d80af63d8ab69 (diff)
downloadnextcloud-server-1e69f5e7ac3414f307aac16842655a34a2f3c709.tar.gz
nextcloud-server-1e69f5e7ac3414f307aac16842655a34a2f3c709.zip
Log some basic events
Diffstat (limited to 'lib/private/diagnostics')
-rw-r--r--lib/private/diagnostics/event.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/diagnostics/event.php b/lib/private/diagnostics/event.php
index 063c0c49dc2..af5d2ff8840 100644
--- a/lib/private/diagnostics/event.php
+++ b/lib/private/diagnostics/event.php
@@ -81,6 +81,9 @@ class Event implements IEvent {
* @return float
*/
public function getDuration() {
+ if (!$this->end) {
+ $this->end = microtime(true);
+ }
return $this->end - $this->start;
}
}