From df244186fb8c3848c3219680e299d6fb187569d6 Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 17 Dec 2025 01:08:09 +0300 Subject: [PATCH] Prometheus: use correct timestamp resolution (#2110) The spec says it must be milliseconds. --- LibreHardwareMonitor/Utilities/HttpServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibreHardwareMonitor/Utilities/HttpServer.cs b/LibreHardwareMonitor/Utilities/HttpServer.cs index 281a8f3..6a17ba9 100644 --- a/LibreHardwareMonitor/Utilities/HttpServer.cs +++ b/LibreHardwareMonitor/Utilities/HttpServer.cs @@ -683,7 +683,7 @@ public class HttpServer else { // Outputs prometheus tag with labels, value, and timestamp - responseStr += $"{tagLine} {(val.Value * factor).ToString(CultureInfo.InvariantCulture)} {((DateTimeOffset)val.Time).ToUnixTimeSeconds()}\n"; + responseStr += $"{tagLine} {(val.Value * factor).ToString(CultureInfo.InvariantCulture)} {((DateTimeOffset)val.Time).ToUnixTimeMilliseconds()}\n"; } } }