X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FStatistics.js;h=bc3405806d1235707a3b94f76903dfd0313abc48;hb=4a56deef7aeca58425c92ec27388bbe34543ad4f;hp=edbec26221680267b35122e5a40c2a84ab1d6d6d;hpb=2e6f5966ecbefada47d60b1b53d21fe49be439a5;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Statistics.js b/src/utils/Statistics.js index edbec262..bc340580 100644 --- a/src/utils/Statistics.js +++ b/src/utils/Statistics.js @@ -52,10 +52,10 @@ class Statistics { if (currentStatistics) { // Update current statistics timers - currentStatistics.countTime = (currentStatistics.countTime ? currentStatistics.countTime + 1 : 1); - currentStatistics.minTime = (currentStatistics.minTime ? (currentStatistics.minTime > duration ? duration : currentStatistics.minTime) : duration); - currentStatistics.maxTime = (currentStatistics.maxTime ? (currentStatistics.maxTime < duration ? duration : currentStatistics.maxTime) : duration); - currentStatistics.totalTime = (currentStatistics.totalTime ? currentStatistics.totalTime + duration : duration); + currentStatistics.countTime = currentStatistics.countTime ? currentStatistics.countTime + 1 : 1; + currentStatistics.minTime = currentStatistics.minTime ? (currentStatistics.minTime > duration ? duration : currentStatistics.minTime) : duration; + currentStatistics.maxTime = currentStatistics.maxTime ? (currentStatistics.maxTime < duration ? duration : currentStatistics.maxTime) : duration; + currentStatistics.totalTime = currentStatistics.totalTime ? currentStatistics.totalTime + duration : duration; currentStatistics.avgTime = currentStatistics.totalTime / currentStatistics.countTime; } }