refactor: flag tunable as deprecated
[e-mobility-charging-stations-simulator.git] / src / performance / PerformanceStatistics.ts
index 8451a19339c8e2dcfc8d639513c2c0dc4b5d70b8..c5748922bd3dbae68dc4a6c944d6ed7d6e7eb88c 100644 (file)
@@ -4,6 +4,8 @@ import { type PerformanceEntry, PerformanceObserver, performance } from 'node:pe
 import type { URL } from 'node:url';
 import { parentPort } from 'node:worker_threads';
 
+import { secondsToMilliseconds } from 'date-fns';
+
 import {
   ConfigurationSection,
   type IncomingRequestCommand,
@@ -185,7 +187,7 @@ export class PerformanceStatistics {
     if (logStatisticsInterval > 0 && !this.displayInterval) {
       this.displayInterval = setInterval(() => {
         this.logStatistics();
-      }, logStatisticsInterval * 1000);
+      }, secondsToMilliseconds(logStatisticsInterval));
       logger.info(
         `${this.logPrefix()} logged every ${formatDurationSeconds(logStatisticsInterval)}`,
       );