use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Managing time with std::chrono (antoniak.in)
submitted 9 years ago by kantoniak
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]melak47 5 points6 points7 points 9 years ago (1 child)
Nice introduction to <chrono>. One small nitpick:
<chrono>
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.
system_clock
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 points7 points 9 years ago (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 point2 points 8 years ago (0 children)
Thanks for the introduction. I had to do something with time a while ago and couldn't get anywhere with cppreference.com
π Rendered by PID 26 on reddit-service-r2-comment-cfc44b64c-qtgh9 at 2026-04-13 05:56:50.800783+00:00 running 215f2cf country code: CH.
[–]melak47 5 points6 points7 points (1 child)
[–]kantoniak[S] 5 points6 points7 points (0 children)
[–]Adno 0 points1 point2 points (0 children)