STD::CHRONO::TIME_POINT(3cxx)
π NAME π
okay so this is std::chrono::time_point< _Clock, _Dur > from the 3cxx manual, and bestie, it is literally the glow-up of "when did this happen" β chrono::time_point represents a point in time as measured by a clock β¨ no cap.
β¨ SYNOPSIS β¨
π Public Types
the little name-tags it carries around, all four of them, periodt:
typedef _Clock clock
typedef _Dur duration
typedef duration::period period
typedef duration::rep rep
π Public Member Functions
here's the whole roster, i'm not skipping a single one because every one of them is a main character:
constexpr time_point (const duration &__dur)
template<typename _Dur2 , typename = _Require<is_convertible<_Dur2,
_Dur>>> constexpr time_point (const time_point< clock, _Dur2 > &__t)
constexpr time_point & operator++ ()
constexpr time_point operator++ (int)
constexpr time_point & operator+= (const duration &__dur)
constexpr time_point & operator-- ()
constexpr time_point operator-- (int)
constexpr time_point & operator-= (const duration &__dur)
constexpr duration time_since_epoch () const
likeβ¦ two constructors (one taking a const duration &__dur, one templated on _Dur2 doing the is_convertible vibe check and converting from a time_point< clock, _Dur2 >), then the full ++/-- quartet β prefix forms handing back time_point &, postfix forms handing back a plain time_point β the += / -= pair taking a const duration &__dur, and time_since_epoch () which is const and returns a duration. every single one is constexpr, slay π₯
πΈ Static Public Member Functions
the two extremes, both static, both constexpr, both noexcept β icons only:
static constexpr time_point max () noexcept
static constexpr time_point min () noexcept
π¦ Related Symbols
heads up bestie β (Note that these are not member symbols.) π
so yes, this one lives outside the class, iykyk:
template<typename _Clock , typename _Dur1 , typename _Rep2 ,
typename _Period2 > constexpr time_point< _Clock, typename
common_type< _Dur1, duration< _Rep2, _Period2 > >::type >
operator+ (const time_point< _Clock, _Dur1 > &__lhs, const
duration< _Rep2, _Period2 > &__rhs)
it's the operator+ that takes a const time_point< _Clock, _Dur1 > &__lhs plus a const duration< _Rep2, _Period2 > &__rhs and returns a time_point< _Clock, typename common_type< _Dur1, duration< _Rep2, _Period2 > >::type >. the common_type there is doing the friend-group-matching between your two durations, honestly iconic π
π Detailed Description π
template<typename _Clock, typename _Dur>
class std::chrono::time_point< _Clock, _Dur >"chrono::time_point
represents a point in time as measured by a clock
that's the whole flex π«Ά β template on _Clock and _Dur, and it represents a point in time as measured by a clock. that's the entire thesis. ate and left no crumbs.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. (yes the robots wrote it, not me π)
and that's the whole page, bestie π this was the std::chrono::time_point< _Clock, _Dur >(3cxx) page out of the libstdc++ docs, generated automatically by Doxygen from the source code, footer and all β go forth and timestamp things ππ¦
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms