// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include #include #include using namespace vbench; IGNORE_TEST("timer") { Timer timer; EXPECT_APPROX(0.0, timer.sample(), 0.1); std::this_thread::sleep_for(1000ms); EXPECT_APPROX(1.0, timer.sample(), 0.1); timer.reset(); EXPECT_APPROX(0.0, timer.sample(), 0.1); } TEST_MAIN() { TEST_RUN_ALL(); }