'How is std::time_t different from time point in C++?

How is std::time_t different from time point representing the current time?

Are they not the same thing i.e epoch from same start Jan 1 1970?



Solution 1:[1]

std::time_t, as the reference says, ends up being an arithmetic type (i.e. int, long, unsigned long long, etc.). time_point is a templated structure that allows many different operations on top of arithmetic, like converting into a different time unit (i.e. milliseconds, using time_point_cast).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Didier