summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2022-06-26 22:23:13 +0200
committerErich Eckner <git@eckner.net>2022-06-26 22:25:31 +0200
commit8866a963343b03d1ee5369c418289c6bdb26e5c8 (patch)
treea58879863bd3d9f6711ba6c71e7f9980790caab1
parentf32b9f3653b08bbba97be06df92fbb07380a0349 (diff)
downloadFH-Wetter-8866a963343b03d1ee5369c418289c6bdb26e5c8.tar.xz
statistics: Gesamtlückengröße ausgeben
-rw-r--r--fhunit.pas6
1 files 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 *****************************************************