From: Sven Schöling Date: Fri, 15 Sep 2017 11:20:35 +0000 (+0200) Subject: Warnings: LXDebug::log_time X-Git-Tag: release-3.5.4~816 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5313b0e899deacb80c0496b6ea1ad0c402e5a28a;p=kivitendo-erp.git Warnings: LXDebug::log_time --- diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index 707b89230..7dddf2a02 100644 --- 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)" : ''));