0

I'm using google benchmark library for my own program time cost measuring.

I found my program time cost is milliseconds level, but benchmark's default time unit is nanosecond.

Also, many of them are with multi-thread inside so I prefer real-time (wall-clock time) instead of the default one, the main thread's CPU time.

For one specific benchmark test, I can write it as :

BENCHMARK_REGISTER_F(AreaResizeFast_Fixture, tv)->Unit(benchmark::kMillisecond)->UseRealTime();

Question: is it possible globally using milliseconds and real-time, i.e. config them once and use it always?

ChrisZZ
  • 1,521
  • 2
  • 17
  • 24

1 Answers1

2

It's possible to set the time unit globally now according to this PR.

The latest version of the user guide may help.

Asteria
  • 21
  • 5