STD::CHRONO::DURATION(3)

πŸ’– NAME πŸ’–

bestie ok so std::chrono::duration< _Rep, _Period > β€” it's a chrono::duration and what it does is represent a distance between two points in time. that's it. that's the whole vibe. a little gap between two moments πŸ•°οΈβœ¨

(also quick housekeeping: this page lives in the Library Functions Manual, and its title is std::chron... _Period >(3) β€” folding that in up top so you know where you are 🫢)


✨ SYNOPSIS ✨

🌸 Public Types

  • using period
  • using rep

πŸŽ€ Public Member Functions

template<typename _Rep2, typename = _Require<
    is_convertible<const _Rep2&, rep>,       __or_<__is_float<rep>,
    __not_<__is_float<_Rep2>>>>> constexpr duration (const _Rep2 &__rep)
duration (const duration &)=default
template<typename _Rep2, typename _Period2, typename = _Require<
    is_convertible<const _Rep2&, rep>,
    __or_<__is_float<rep>,
    __and_<__is_harmonic<_Period2>,
    __not_<__is_float<_Rep2>>>>>> constexpr duration (const duration<
    _Rep2, _Period2 > &__d)
constexpr rep count () const
template<typename _Rep2 = rep> constexpr
    __enable_if_t<!treat_as_floating_point< _Rep2 >::value, duration & >
    operator%= (const duration &__d)
template<typename _Rep2 = rep> constexpr
    __enable_if_t<!treat_as_floating_point< _Rep2 >::value, duration & >
    operator%= (const rep &__rhs)
constexpr duration & operator*= (const rep &__rhs)
constexpr duration< typename common_type< rep >::type, period >
    operator+ () const
constexpr duration & operator++ ()
constexpr duration operator++ (int)
constexpr duration & operator+= (const duration &__d)
constexpr duration< typename common_type< rep >::type, period >
    operator- () const
constexpr duration & operator-- ()
constexpr duration operator-- (int)
constexpr duration & operator-= (const duration &__d)
constexpr duration & operator/= (const rep &__rhs)
duration & operator= (const duration &)=default

πŸ¦‹ Static Public Member Functions

  • static constexpr duration max () noexcept
  • static constexpr duration min () noexcept
  • static constexpr duration zero () noexcept
heads up bestie: these are not member symbols. they're the free-floating friends of the class, doing their own thing πŸ’…
  • template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr common_type< duration< _Rep1, _Period1 >, duration< _Rep2, _Period2 > >::type operator+ (const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs) β€” The sum of two durations. literally just adding two time-gaps together, iconic behavior.
  • template<typename _Rep1, typename _Period, typename _Rep2> constexpr duration< __common_rep_t< _Rep1, _Rep2 >, _Period > operator* (const duration< _Rep1, _Period > &__d, const _Rep2 &__s)
  • template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr bool operator== (const duration< _Rep1, _Period1 > &__lhs, const duration< _Rep2, _Period2 > &__rhs)

πŸ”₯ Detailed Description πŸ”₯

template<typename _Rep, typename _Period>
    class std::chrono::duration< _Rep, _Period >

"chrono::duration represents a distance between two points in time β³πŸ’–


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. no human author to credit, it just. spawned. like that. slay, honestly 🧚✨


okay bye bestie, go measure some time πŸŽ€ that was the whole page β€” source/version is libstdc++ and the manpage slot is std::chron... _Period >(3), mwah πŸ’…πŸ«Ά

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