]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
get elapsed time
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Wed, 23 Aug 2017 23:56:18 +0000 (00:56 +0100)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Wed, 23 Aug 2017 23:56:18 +0000 (00:56 +0100)
raddb/policy.d/time

index 4fed49b0712e30405e87db2185d21180e375c33c..bf3560ab6dca1235e4b90982af6870adccd29fd1 100644 (file)
@@ -6,3 +6,12 @@ time_current_ms {
                Tmp-Integer64-0 := "%{expr:(%c*1000) + (%C/1000)}"
        }
 }
+
+# Returns elapsed time in ms since time_current_ms
+#
+# Sets Tmp-Integer64-1 with number of milliseconds
+time_elapsed_ms {
+       update request {
+               Tmp-Integer64-1 := "%{expr:(%c*1000) + (%C/1000) - %{Tmp-Integer64-0}}"
+       }
+}