9 #include "gtest/gtest.h"
16 for (std::size_t
i = 0;
i !=
d; ++
i) {
25 EXPECT_EQ(
timer.units(),
"us");
28 EXPECT_EQ(
timer.units(),
"ns");
30 std::size_t delay_par(10000);
32 auto tup =
timer.read_bare();
33 EXPECT_EQ(std::get<0>(tup), 0.);
34 EXPECT_EQ(std::get<1>(tup), 0);
35 EXPECT_EQ(std::get<2>(tup),
"ns");
41 tup =
timer.read_bare();
42 EXPECT_GE(std::get<0>(tup), 0.0);
43 EXPECT_EQ(std::get<1>(tup), 1);
44 EXPECT_EQ(std::get<2>(tup),
"ns");
48 double e0 =
timer.elapsed_to_now();
50 double e1 =
timer.elapsed_to_now();
52 double e2 =
timer.elapsed_to_update();
59 tup =
timer.read_bare();
60 EXPECT_EQ(std::get<0>(tup), 0.0);
61 EXPECT_EQ(std::get<1>(tup), 0);
62 EXPECT_EQ(std::get<2>(tup),
"ns");