Hacker News new | ask | show | jobs
by ovao 1167 days ago
With few limitations, yes. In C++20, you could for example test for constant evaluation[1], using that as a mechanism to fall back to a real clock during runtime.

[1]: https://en.cppreference.com/w/cpp/types/is_constant_evaluate...