~/talk

How Old Am I in Seconds? Insights From the C++ chrono Library

Talkat ACCU 2025 · 2025-04-01..04-04· [c-and-cpp, web-platform]
slides:none on file

C++ chrono pairs C++11 durations/time_points with C++20 calendars, formatting and time zones to handle real cases: compile‑time unit selection to avoid overflow, year/month/day types with validation and last‑day semantics, integration with the IANA time zone database (≈500 KB), and separate clocks (system, steady, UTC, GPS, TAI) so leap seconds are representable. Practical surprises: converting a birthday to UTC can add about 27 seconds difference using UTC vs system clock, and std::format adopts familiar strftime specifiers.

AI-written summary · about

  1. 0:00C++ chrono library intro
  2. 1:09Evolution in C++11 and C++20
  3. 13:19Durations and time points
  4. 20:53Duration pitfalls and overflows
  5. 28:52C++20 calendar features
  6. 44:45Time zones and IANA
  7. 1:00:26Clocks and leap seconds
  8. 1:10:03Age in seconds calculation
  9. 1:13:51Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.