import type { URL } from 'node:url';
import { parentPort } from 'node:worker_threads';
+import { secondsToMilliseconds } from 'date-fns';
+
import {
ConfigurationSection,
type IncomingRequestCommand,
if (logStatisticsInterval > 0 && !this.displayInterval) {
this.displayInterval = setInterval(() => {
this.logStatistics();
- }, logStatisticsInterval * 1000);
+ }, secondsToMilliseconds(logStatisticsInterval));
logger.info(
`${this.logPrefix()} logged every ${formatDurationSeconds(logStatisticsInterval)}`,
);
);
} else if (logConfiguration.enabled) {
logger.info(
- `${this.logPrefix()} log interval is set to ${logStatisticsInterval?.toString()}. Not logging statistics`,
+ `${this.logPrefix()} log interval is set to ${logStatisticsInterval}. Not logging statistics`,
);
}
}