<< 's';
}
-std::ostream& operator<<(std::ostream& m, const timespan& t) {
- static_assert(std::is_unsigned_v<timespan::rep>);
- using seconds_t = std::chrono::duration<float>;
- fmt::print(m, "{:.9}", std::chrono::duration_cast<seconds_t>(t));
- return m;
-}
-
template<typename Clock,
typename std::enable_if<!Clock::is_steady>::type*>
std::ostream& operator<<(std::ostream& m,
}
}
+
+namespace std {
+ostream& operator<<(ostream& m, const ::ceph::timespan& t) {
+ static_assert(is_unsigned_v<::ceph::timespan::rep>);
+ using seconds_t = chrono::duration<float>;
+ ::fmt::print(m, "{:.9}", chrono::duration_cast<seconds_t>(t));
+ return m;
+}
+} // namespace std
return d ? std::make_optional(make_timespan(d)) : std::nullopt;
}
-std::ostream& operator<<(std::ostream& m, const timespan& t);
template<typename Clock,
typename std::enable_if<!Clock::is_steady>::type* = nullptr>
std::ostream& operator<<(std::ostream& m,
} // namespace ceph
+namespace std {
+ostream& operator<<(ostream& m, const ::ceph::timespan& t);
+}
+
#endif // COMMON_CEPH_TIME_H