aboutsummaryrefslogtreecommitdiffstats
path: root/eval/src/tests/ann/time-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'eval/src/tests/ann/time-util.h')
-rw-r--r--eval/src/tests/ann/time-util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/eval/src/tests/ann/time-util.h b/eval/src/tests/ann/time-util.h
new file mode 100644
index 00000000000..2f5c2bdd583
--- /dev/null
+++ b/eval/src/tests/ann/time-util.h
@@ -0,0 +1,9 @@
+// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+using TimePoint = std::chrono::steady_clock::time_point;
+using Duration = std::chrono::steady_clock::duration;
+
+double to_ms(Duration elapsed) {
+ std::chrono::duration<double, std::milli> ms(elapsed);
+ return ms.count();
+}