Упрощенный пример:
Код: Выделить всё
#include
#include
int main() {
using clock = std::chrono::system_clock;
auto t1 = clock::now();
// some work
auto t2 = clock::now();
if (t2 < t1) {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79875990/why-does-stdchronosystem-clocknow-move-backwards-inside-a-running-c-pr[/url]
Мобильная версия