22 template<
typename T, typename ::std::enable_if_t<
23 ::std::is_same<T, ::ros::Time>::value ||
24 ::std::is_same<T, ::ros::WallTime>::value ||
25 ::std::is_same<T, ::ros::SteadyTime>::value
38 typedef ::ros::WallDuration
value;
43 typedef ::ros::WallDuration
value;
49 typename ::std::enable_if_t<
50 ::std::is_same<T1, ::ros::Time>::value ||
51 ::std::is_same<T1, ::ros::WallTime>::value ||
52 ::std::is_same<T1, ::ros::SteadyTime>::value>* =
nullptr,
53 typename ::std::enable_if_t<
54 ::std::is_same<T2, ::ros::Time>::value ||
55 ::std::is_same<T2, ::ros::WallTime>::value ||
56 ::std::is_same<T2, ::ros::SteadyTime>::value>* =
nullptr
60 return T1{time.sec, time.nsec};
66 typename ::std::enable_if_t<
67 ::std::is_same<D1, ::ros::Duration>::value ||
68 ::std::is_same<D1, ::ros::WallDuration>::value>* =
nullptr,
69 typename ::std::enable_if_t<
70 ::std::is_same<D2, ::ros::Duration>::value ||
71 ::std::is_same<D2, ::ros::WallDuration>::value>* =
nullptr
75 return D1{duration.sec, duration.nsec};
100 double frequency(const ::ros::Rate& rate,
bool maxCycleTimeMeansZero =
false);
108 double frequency(const ::ros::WallRate& rate,
bool maxCycleTimeMeansZero =
false);
186 ::cras::expected<::ros::Time, ::std::string>
fromStructTm(const ::tm& time);
193 int getYear(const ::ros::Time& time);
200 inline int getYear(const ::ros::WallTime& time)
210 inline int getYear(const ::ros::SteadyTime& time)
226 bool operator==(const ::ros::Rate& r1, const ::ros::Rate& r2);
234 bool operator==(const ::ros::WallRate& r1, const ::ros::WallRate& r2);