coryan/jaybeams

Automatically select between std::steady_clock and std::high_resolution_clock in jb::microbenchmark

coryan opened this issue · 0 comments

The jb::microbenchmark class needs a steady clock to perform relative measurements. The class uses std::steady_clock because it is always guaranteed to have this property. However, we could determine at compile-time if std::high_resolution_clock is also steady (using the is_steady static member variable). If it is steady then it is a "better" choice (or at least no worse choice).

In most implementations this will have no effect, but this issue documents the choices we have made for future reference.