From 1a1b09fc3d53ed75fce8fc2becbc288bfde35e85 Mon Sep 17 00:00:00 2001 From: darshanime Date: Fri, 19 Apr 2024 18:52:50 +0530 Subject: [PATCH] Add a note about the new syntax Signed-off-by: darshanime --- docs/querying/basics.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/querying/basics.md b/docs/querying/basics.md index fee7e63c4..b7584adba 100644 --- a/docs/querying/basics.md +++ b/docs/querying/basics.md @@ -81,6 +81,16 @@ Examples: 0x8f -Inf NaN + + +As of version 2.53, float literals can also be represented using the syntax of time durations, where the time duration is converted into a float value corresponding to the number of seconds the time duration represents. This is an experimental feature and might still change. + +Examples: + + 1s # Equivalent to 1.0 + 2m # Equivalent to 120.0 + 1ms # Equivalent to 0.001 + ## Time series selectors @@ -224,6 +234,15 @@ Here are some examples of valid time durations: 5m 10s + +As of version 2.53, time durations can also be represented using the syntax of float literals, implying the number of seconds of the time duration. This is an experimental feature and might still change. + +Examples: + + 1.0 # Equivalent to 1s + 0.001 # Equivalent to 1ms + 120 # Equivalent to 2m + ### Offset modifier The `offset` modifier allows changing the time offset for individual