I actually do not agree with the "accepted answer". It is purely wrong on the Microsoft side, and can cause unrealistic expectations. The C++11 standard requires system_clock
to implement to_time_t
and from_time_t
, but there are no such requirements for steady_clock
and high_resolution_clock
. It is not an "is-a" relationship, as steady_clock
does not implement all required interfaces of system_clock
; nor should it. Microsoft's action does not make sense to me: How can you expect a steady_clock
has to_time_t
while avoiding the problem of time skewing?
So, simply put, Microsoft made a mistake, and they are slow to fix it. According to Stephan T. Lavavej, he "didn't have time to fix this in 2013 RTM", and "all of the clocks need to be reimplemented, as tracked by several active bugs". See https://connect.microsoft.com/VisualStudio/feedback/details/719443/.
I guess it was not he that wrote the rubbish fake implementation in the beginning.
EDIT: I am a bit surprised that I got downvoted, even a little upset. My downvoters and disagreers, do you realize that you are rationalizing a broken implementation, which may be changed and fixed soon? Name me one real implementation that has steady_clock
inherit from system_clock
and is not broken....
FACT UPDATE in July 2014: As of Visual Studio 2014 CTP2, steady_clock
no longer inherits from system_clock
....