I am very confused about something. Given:
std::time_t tt = std::time(0);
std::chrono::system_clock::time_point tp{seconds{tt} + millseconds{298}};
std::cout << tp.time_since_epoch().count();
prints something like: 16466745672980000 (for example)
How do I rehydrate that number back into a time_point object? I find myself doing kooky things (that I’d rather not show here) and I’d like to ask what the correct way to do the rehydration is.
>Solution :
system_clock::time_point tp{system_clock::duration{16466745672980000}};
The units of system_clock::duration vary from platform to platform. On your platform I’m guessing it is 1/10 of a microsecond.