std::chrono::gps_clock(3)

✨ std::chrono::gps_clock ✨

okay bestie, welcome to the Library Functions Manual entry for std::chrono::gps_clock β€” yes the whole thing, no skimming, we're doing this properly πŸ’…


🌸 NAME 🌸

std::chrono::gps_clock β€” literally the GPS clock, that's the name, that's the whole vibe πŸ›°οΈ


πŸŽ€ SYNOPSIS πŸŽ€

#include <chrono>

yeah that's the include, go ahead and add it, I'll wait 🫢

πŸ’œ Public Types

  • using duration β€” the duration type, as one does
  • using period β€” the period type, ticking along
  • using rep β€” the rep type, holding the numbers
  • using time_point β€” the time_point type, a whole moment in time, main character energy

πŸ¦‹ Static Public Member Functions

template<typename _Duration> static gps_time< common_type_t< _Duration, seconds > > from_utc (const utc_time< _Duration > &__t)
static time_point now ()
template<typename _Duration> static utc_time< common_type_t< _Duration, seconds > > to_utc (const gps_time< _Duration > &__t)

three of them, all static, all iconic:

  • from_utc β€” takes a utc_time< _Duration > (the __t) and hands you back a gps_time< common_type_t< _Duration, seconds > > ✨
  • now β€” gives you the current time_point, the classic "what time is it right now" move ⏰
  • to_utc β€” takes a gps_time< _Duration > (the __t) and hands you back a utc_time< common_type_t< _Duration, seconds > >, the reverse glow-up πŸ”

⭐ Static Public Attributes

  • static constexpr bool is_steady β€” it's a static constexpr bool, and yes, it's about steadiness, bestie

🌈 Detailed Description 🌈

A clock that measures GPS time. That's the whole job description. It's giving satellite precision, no cap πŸ›°οΈπŸ’–

The epoch is 1980-01-06 00:00:00. That's the moment everything counts from, remember it, it's important, fr fr πŸŽ€

Since C++20

so if your compiler is ancient, this whole page is gonna be a no from it 😭


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. Not a human, just a very diligent little robot doing its thing πŸ€–βœ¨


and that's the page!! every type, every function, every attribute, the epoch, the C++20 stamp, all of it πŸ’–

this lil' writeup came out of the libstdc++ world, footer and all β€” the footer's date slot is doing that thing where it's just not here, so like, no date, but the source/version is libstdc++, and the manpage title is std::chrono::gps_clock(3). slay, bye bestie 🫢🌸

πŸ“¦ 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