'unsigned long long to std::chrono::time_point and back
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
