27 Time library [time]

27.9 Class template time_­of_­day [time.tod]

27.9.1 Overview [time.tod.overview]

namespace std::chrono {
  template<class Duration> class time_of_day;

  template<> class time_of_day<hours>;
  template<> class time_of_day<minutes>;
  template<> class time_of_day<seconds>;
  template<class Rep, class Period> class time_of_day<duration<Rep, Period>>;
}
The time_­of_­day class template splits a duration representing the time elapsed since midnight into a “broken down” time of day such as hours:minutes:seconds.
The Duration template parameter dictates the precision to which the time is broken down.
[Note
:
This can vary from a coarse precision of hours to a very fine precision of nanoseconds.
end note
]
A time_­of_­day object also tracks whether it should be output as a 12-hour time format or a 24-hour time format.
The primary time_­of_­day template is not defined.
Four specializations are provided to handle four different levels of precision.
Each specialization of time_­of_­day is a trivially copyable and standard-layout class type.