20 std::ostringstream os;
26 template<
typename Clock,
typename Duration =
typename Clock::duration >
29 auto in_time_t = std::chrono::system_clock::to_time_t( tp );
34 template<
typename Rep,
typename Period = std::ratio< 1 > >
37 auto seconds_as_int = std::chrono::duration_cast< std::chrono::seconds >( duration );
38 if( seconds_as_int == duration )
40 auto seconds_as_double = std::chrono::duration_cast< std::chrono::duration< double > >( duration );
41 std::ostringstream os;
42 os << seconds_as_double.count();
48 template<
typename Clock,
typename Duration =
typename Clock::duration >
49 std::ostream &
operator<<( std::ostream & o,
const std::chrono::time_point< Clock, Duration > & tp )
55 template<
typename Rep,
typename Period = std::ratio< 1 > >
56 std::ostream &
operator<<( std::ostream & o,
const std::chrono::duration< Rep, Period > & duration )