projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ff2169
)
Warnings: LXDebug::log_time
author
Sven Schöling
<s.schoeling@linet-services.de>
Fri, 15 Sep 2017 11:20:35 +0000
(13:20 +0200)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Fri, 15 Sep 2017 11:20:35 +0000
(13:20 +0200)
SL/LXDebug.pm
patch
|
blob
|
history
diff --git
a/SL/LXDebug.pm
b/SL/LXDebug.pm
index
707b892
..
7dddf2a
100644
(file)
--- a/
SL/LXDebug.pm
+++ b/
SL/LXDebug.pm
@@
-348,7
+348,10
@@
sub log_time {
return 1 unless want_request_timer();
my $now = $self->get_request_time;
- my $diff = int((($now - ($self->{previous_log_time} // 0)) * 10_000 + 5) / 10);
+
+ return 1 unless $now;
+
+ my $diff = $self->{previous_log_time} ? int((($now - ($self->{previous_log_time} // 0)) * 10_000 + 5) / 10) : $now * 10_0000 + 5;
$self->{previous_log_time} = $now;
$self->_write("time", "${now}s Δ ${diff}ms" . (@slurp ? " (@slurp)" : ''));