【发布时间】:2020-10-07 21:49:58
【问题描述】:
基本上:
auto p1 = std::steady_clock::now().time_since_epoch().count();
... // do smth for unspecified period of time
auto p2 = std::steady_clock::now().time_since_epoch().count();
assert(p2 >= p1); // is this guaranteed?
?
如果是——这是如何保证的?通过确保没有任何 C++ 程序运行时间超过 std::steady_clock::duration::max() - std::steady_clock::duration::zero()?
【问题讨论】: