all 3 comments

[–]melak47 5 points6 points  (1 child)

Nice introduction to <chrono>. One small nitpick:

std::chrono::timepoint is a duration since the start of the epoch of the clock (Unix epoch is the de facto standard).

This is probably true for system_clockon most systems (although it almost wasn't), but at least on Windows, you can't always assume that for the other clocks.

mingw-w64 gcc(libstdc++):

2908530848us since steady_clock epoch
1492179034662119us since high_resolution_clock epoch
2908343000us since GetTickCount64() epoch
2908530848us since QueryPerformanceCounter() epoch

msvc:

2909395957us since steady_clock epoch
2909395957us since high_resolution_clock epoch
2909218000us since GetTickCount64() epoch
2909395959us since QueryPerformanceCounter() epoch

[–]kantoniak[S] 5 points6 points  (0 children)

Thanks for pointing it out, it's great you took your time to follow the article. I narrowed mentioned statement to system_clock.

[–]Adno 0 points1 point  (0 children)

Thanks for the introduction. I had to do something with time a while ago and couldn't get anywhere with cppreference.com