From 8866a963343b03d1ee5369c418289c6bdb26e5c8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 26 Jun 2022 22:23:13 +0200 Subject: statistics: Gesamtlückengröße ausgeben MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fhunit.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fhunit.pas b/fhunit.pas index a1b2cbf..66ba1f6 100644 --- a/fhunit.pas +++ b/fhunit.pas @@ -382,7 +382,7 @@ end; function tMessPunkteListe.statistics: string; var - i,gaps: longint; + i,gaps,gap: longint; begin if count=0 then begin result:='leer'; @@ -390,13 +390,15 @@ begin end; result:=''; gaps:=0; + gap:=0; for i:=count-1 downto 1 do if round((items[i].zeit - items[i-1].zeit) * 6 * 24) <> 1 then begin inc(gaps); + gap:=gap + round((items[i].zeit - items[i-1].zeit) * 6 * 24 - 1); result:=result + dateTimeToStr(items[i-1].zeit) + ' -> ' + dateTimeToStr(items[i].zeit) + #10; end; result:=result + intToStr(count) + ' Werte von ' + dateTimeToStr(items[0].zeit) + ' bis ' + dateTimeToStr(items[count-1].zeit) + #10; - result:=result + intToStr(gaps) + ' Lücken'; + result:=result + intToStr(gaps) + ' Lücken, ' + intToStr(gap) + ' Messwerte'; end; // tMessPunkteUpdateThread ***************************************************** -- cgit v1.2.3-70-g09d2