Remove walltime implementation tests and expose less internals
diff --git a/src/walltime.cc b/src/walltime.cc
index 325040b..da6d633 100644
--- a/src/walltime.cc
+++ b/src/walltime.cc
@@ -163,9 +163,6 @@
last_adjust_time_ = static_cast<uint32_t>(uint64_t(base_cycletime_) >> 32);
}
-} // end anonymous namespace
-
-
WallTime CPUWalltimeNow() {
static WallTimeImp& imp = WallTimeImp::GetWallTimeImp();
return imp.Now();
@@ -191,6 +188,9 @@
return useWallTime;
}
+
+} // end anonymous namespace
+
// WallTimeImp doesn't work when CPU Scaling is enabled. If CPU Scaling is
// enabled at the start of the program then std::chrono::system_clock is used
// instead.
diff --git a/src/walltime.h b/src/walltime.h
index 497112e..face158 100644
--- a/src/walltime.h
+++ b/src/walltime.h
@@ -7,8 +7,6 @@
typedef double WallTime;
namespace walltime {
-WallTime CPUWalltimeNow();
-WallTime ChronoWalltimeNow();
WallTime Now();
} // end namespace walltime
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f8f01d0..8fdb6f3 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -32,5 +32,3 @@
set_target_properties(cxx03_test
PROPERTIES COMPILE_FLAGS "${CXX03_FLAGS}")
add_test(cxx03 cxx03_test)
-
-compile_benchmark_test(walltime_test)
diff --git a/test/walltime_test.cc b/test/walltime_test.cc
deleted file mode 100644
index 18c432b..0000000
--- a/test/walltime_test.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-
-#include <cstddef>
-
-#include "benchmark/benchmark_api.h"
-#include "../src/walltime.h"
-
-void BM_CPUTimeNow(benchmark::State& state) {
- using benchmark::walltime::CPUWalltimeNow;
- while (state.KeepRunning()) {
- benchmark::WallTime volatile now;
- now = CPUWalltimeNow();
- now = CPUWalltimeNow();
- now = CPUWalltimeNow();
- now = CPUWalltimeNow();
- now = CPUWalltimeNow();
- ((void)now);
- }
-}
-BENCHMARK(BM_CPUTimeNow);
-
-void BM_ChronoTimeNow(benchmark::State& state) {
- using benchmark::walltime::ChronoWalltimeNow;
- while (state.KeepRunning()) {
- benchmark::WallTime volatile now;
- now = ChronoWalltimeNow();
- now = ChronoWalltimeNow();
- now = ChronoWalltimeNow();
- now = ChronoWalltimeNow();
- now = ChronoWalltimeNow();
- ((void)now);
- }
-}
-BENCHMARK(BM_ChronoTimeNow);
-
-
-BENCHMARK_MAIN()