Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::chrono::hh_mm_ss

      From cppreference.com
      <cpp‎ |chrono
       
       
      Date and time library
      Time point
      (C++11)
      (C++20)
      Duration
      (C++11)
      Clocks
      (C++20)
      (C++20)
      (C++20)
      (C++20)
      (C++20)
      (C++20)
      Time of day
      (C++20)(C++20)
      (C++20)(C++20)
      hh_mm_ss
      (C++20)
       
       
      Defined in header<chrono>
      template<class Duration>
      class hh_mm_ss;
      (since C++20)

      The class templatehh_mm_ss splits astd::chrono::duration into a "broken down" time such ashours:minutes:seconds, with the precision of the split determined by theDuration template parameter. It is primarily a formatting tool.

      Duration must be a specialization ofstd::chrono::duration, otherwise the program is ill-formed.

      Contents

      [edit]Member constants

      constexpr unsigned fractional_width
      [static]
      the smallest possible integer in the range[018] such thatprecision (see below) will exactly represent the value ofDuration{1}, or6 if there's no such integer
      (public static member constant)

      [edit]Member types

      Member type Definition
      precision

      std::chrono::duration<std::common_type_t<Duration::rep, std::chrono::seconds::rep>,                     std::ratio<1,10fractional_width>>

      [edit]Member functions

      constructs ahh_mm_ss
      (public member function)[edit]
      obtains components of the broken-down time
      (public member function)[edit]
      obtains the storedstd::chrono::duration
      (public member function)[edit]

      [edit]Non-member functions

      (C++20)
      outputs ahh_mm_ss into a stream
      (function template)[edit]

      [edit]Helper classes

      formatting support forhh_mm_ss
      (class template specialization)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/chrono/hh_mm_ss&oldid=161589"

      [8]ページ先頭

      ©2009-2025 Movatter.jp