Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::chrono::file_clock::to_sys,std::chrono::file_clock::from_sys

      From cppreference.com
      <cpp‎ |chrono‎ |file clock
       
       
      Date and time library
       
       
      template<class Duration>

      staticstd::chrono::sys_time</*see below*/>

          to_sys(conststd::chrono::file_time<Duration>& t);
      (1)(since C++20)
      (optional*)
      template<class Duration>

      staticstd::chrono::file_time</*see below*/>

          from_sys(conststd::chrono::sys_time<Duration>& t);
      (2)(since C++20)
      (optional*)
      1) Converts thefile_timet to asys_time representing the same point in time.
      2) Converts thesys_timet to afile_time representing the same point in time.

      The duration of the return type is computed fromDuration in an unspecified manner.

      These function templates are optional: an implementation may choose to instead provideto_utc() andfrom_utc().

      Contents

      [edit]Return value

      1) Asys_time representing the same point in time as the argument.
      2) Afile_time representing the same point in time as the argument.

      [edit]Notes

      User code should usually usestd::chrono::clock_cast, which provides a generic interface to convert time points between clocks, rather than call these functions directly.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      [static](optional)
      converts betweenfile_time andutc_time
      (public static member function)[edit]
      (C++20)
      convert time points of one clock to another
      (function template)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/chrono/file_clock/to_from_sys&oldid=177463"

      [8]ページ先頭

      ©2009-2026 Movatter.jp