aboutsummaryrefslogtreecommitdiff
path: root/prometheus.scm
diff options
context:
space:
mode:
Diffstat (limited to 'prometheus.scm')
-rw-r--r--prometheus.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/prometheus.scm b/prometheus.scm
index 270ff28..e0f58f6 100644
--- a/prometheus.scm
+++ b/prometheus.scm
@@ -379,12 +379,13 @@ The metric with the name @var{metric-name} is fetched from the
#:docstring docstring
#:labels labels
#:label-preset-values label-preset-values)))
- (start-time (current-time)))
+ (start-time (get-internal-real-time)))
(call-with-values
thunk
(lambda results
(metric-observe metric
- (- (current-time) start-time)
+ (/ (- (get-internal-real-time) start-time)
+ internal-time-units-per-second)
#:label-values label-values)
(apply values results)))))