#include <iostream>
#include <chrono>
int main()
{
usingnamespace std::chrono;
int value = 0;
auto limit = seconds(2);
auto begin = system_clock::now();
auto end = begin;
while (end = system_clock::now(), end - begin < limit)
++value;
std::cout << "Value: " << value << '\n';
}