summaryrefslogtreecommitdiffstats
path: root/fnet/src/tests/time/timespeed.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fnet/src/tests/time/timespeed.cpp')
-rw-r--r--fnet/src/tests/time/timespeed.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fnet/src/tests/time/timespeed.cpp b/fnet/src/tests/time/timespeed.cpp
index 1204b0ff334..e6d2af5a278 100644
--- a/fnet/src/tests/time/timespeed.cpp
+++ b/fnet/src/tests/time/timespeed.cpp
@@ -9,14 +9,14 @@ using vespalib::BenchmarkTimer;
TEST("steady clock speed") {
using clock = std::chrono::steady_clock;
clock::time_point t;
- double min_time_us = BenchmarkTimer::benchmark([&t](){t = clock::now();}, 1.0) * 1000000.0;
+ double min_time_us = BenchmarkTimer::benchmark([&t]() noexcept {t = clock::now();}, 1.0) * 1000000.0;
fprintf(stderr, "approx overhead per sample (steady clock): %f us\n", min_time_us);
}
TEST("system clock speed") {
using clock = std::chrono::system_clock;
clock::time_point t;
- double min_time_us = BenchmarkTimer::benchmark([&t](){t = clock::now();}, 1.0) * 1000000.0;
+ double min_time_us = BenchmarkTimer::benchmark([&t]() noexcept {t = clock::now();}, 1.0) * 1000000.0;
fprintf(stderr, "approx overhead per sample (system clock): %f us\n", min_time_us);
}