blob: b34c7b3037df8d79fd5ce5d207e0a65cb60922e6 [file] [log] [blame]
#include <cstddef>
#include "benchmark/benchmark_api.h"
#include "../src/walltime.h"
void BM_CPUTimeNow(benchmark::State& state) {
while (state.KeepRunning()) {
benchmark::WallTime volatile now = benchmark::walltime::CPUWalltimeNow();
((void)now);
}
}
BENCHMARK(BM_CPUTimeNow);
void BM_ChronoTimeNow(benchmark::State& state) {
while (state.KeepRunning()) {
benchmark::WallTime volatile now = benchmark::walltime::ChronoWalltimeNow();
((void)now);
}
}
BENCHMARK(BM_ChronoTimeNow);
BENCHMARK_MAIN()