std::chrono::utc_clock(3)

πŸ¦‹ NAME πŸ¦‹

std::chrono::utc_clock β€” bestie, it's a clock. But like, the UTC clock. This is a page from the Library Functions Manual, so pull up a chair and let's get into it πŸ’…


✨ SYNOPSIS ✨

Okay so first things first, you gotta let the compiler know you're about that chrono life:

#include <chrono>

That's it. That's the door. Everything else lives inside std::chrono. 🫢

🌸 Public Types 🌸

The lil' building blocks, no cap:

  • duration
  • period
  • rep
  • time_point

πŸŽ€ Static Public Member Functions πŸŽ€

These are the static girlies β€” you don't need an instance to call them:

  • template<typename _Duration> static utc_time< common_type_t< _Duration, seconds > > from_sys (const sys_time< _Duration > &__t)
  • static time_point now ()
  • template<typename _Duration> static sys_time< common_type_t< _Duration, seconds > > to_sys (const utc_time< _Duration > &__t)

⭐ Static Public Attributes ⭐

  • static constexpr bool is_steady

πŸ’– Detailed Description πŸ’–

A clock that measures Universal Coordinated Time (UTC). Literally what it says on the tin, periodt.

The epoch is 1970-01-01 00:00:00. That's the moment everything starts counting from, iconic behaviour honestly πŸŽ€

Since

C++20 ✨ (so if your standard's older than that, this page is giving unattainable energy, sorry bestie 😭)


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. Not a human, just vibes and tooling 🧚


πŸ’Œ cute lil sign-off: this page is a libstdc++ manual page β€” std::chrono::utc_clock(3) β€” and it came straight from the libstdc++ source. Love that for us. Take care of her, she's iconic πŸ’œπŸŒΈ
πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms