std::chrono::gps_clock(3cxx)

πŸ’– std::chrono::gps_clock β€” 3cxx manual, bestie edition πŸ’–

Okay so you opened the 3cxx page for std::chrono::gps_clock, and I'm obsessed. She's the GPS-time clock from <chrono>, and we're gonna go through every single detail together. No skipping, no cap. ✨

🌸 NAME 🌸

std::chrono::gps_clock β€” the GPS clock, periodt. πŸ›°οΈπŸ’…

⭐ SYNOPSIS ⭐

#include <chrono>

πŸŽ€ Public Types πŸŽ€

  • using duration = chrono::duration< rep, period > β€” the duration type, literally right there.
  • using period = system_clock::period β€” the period is borrowed from system_clock::period.
  • using rep = system_clock::rep β€” the rep is borrowed from system_clock::rep.
  • using time_point = chrono::time_point< gps_clock > β€” the time-point type is chrono::time_point< gps_clock >.

πŸ¦‹ Static Public Member Functions πŸ¦‹

The from_utc signature, exactly as printed:

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

The now() signature, exactly as printed:

static time_point now ()

The to_utc signature, exactly as printed:

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

πŸ’… Static Public Attributes πŸ’…

  • static constexpr bool is_steady β€” yep, that's the whole attribute, bestie.

πŸ”₯ Detailed Description πŸ”₯

A clock that measures GPS time. Iconic behavior. ✨

The epoch is 1980-01-06 00:00:00. Remember that date, it's giving time-origin main character energy. πŸ•°οΈ

Since: C++20

πŸ‘‘ Author πŸ‘‘

Author: Generated automatically by Doxygen for libstdc++ from the source code.


Mwah πŸ’‹ β€” this cutie is brought to you by libstdc++, in the 3cxx manual. The original footer doesn't print a date, so I'm not inventing one, bestie. πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from