Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
coryan opened this issue Dec 31, 2016 · 0 comments

Comments

@coryan
Copy link
Owner

coryan commented Dec 31, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant