29 #ifndef SWRI_ROSCPP_TIMER_H_ 30 #define SWRI_ROSCPP_TIMER_H_ 92 const std::string &
name,
126 return impl_->desiredPeriod();
138 return impl_->resetStatistics();
144 return impl_->ticks();
150 return impl_->meanFrequencyHz();
156 return impl_->meanPeriod();
162 return impl_->minPeriod();
168 return impl_->maxPeriod();
174 return impl_->meanPeriod().toNSec() / 1000000.0;
180 return impl_->minPeriod().toNSec() / 1000000.0;
186 return impl_->maxPeriod().toNSec() / 1000000.0;
192 return impl_->meanDuration();
198 return impl_->minDuration();
204 return impl_->maxDuration();
210 return impl_->meanDuration().toNSec() / 1000.0;
216 return impl_->minDuration().toNSec() / 1000.0;
222 return impl_->maxDuration().toNSec() / 1000.0;
229 const std::string &
name,
241 status.
addf(name +
" ticks",
"%d",
ticks());
248 "min period: N/A ms, mean frequency: N/A hz, max period: N/A ms");
252 "min period: %.2f ms, mean frequency: %.2f hz, max period: %.2f ms",
261 status.
add(name +
" duration",
262 "min: N/A us, mean: N/A us, max: N/A us");
264 status.
addf(name +
" duration",
265 "min: %.2f us, mean: %.2f us, max: %.2f us",
273 #endif // SWRI_ROSCPP_TIMER_H_
ros::WallDuration meanDuration() const
ros::WallDuration minDuration() const
double minPeriodMilliseconds() const
void appendDiagnostics(diagnostic_updater::DiagnosticStatusWrapper &status, const std::string &name, const int flags)
ros::Duration maxPeriod() const
double meanDurationMicroseconds() const
ros::Duration minPeriod() const
double maxDurationMicroseconds() const
void addf(const std::string &key, const char *format,...)
double desiredFrequency() const
double minDurationMicroseconds() const
ros::Duration meanPeriod() const
Timer & operator=(const Timer &other)
double meanPeriodMilliseconds() const
double meanFrequencyHz() const
ros::Duration desiredPeriod() const
void add(const std::string &key, const T &val)
double maxPeriodMilliseconds() const
ros::WallDuration maxDuration() const
boost::shared_ptr< TimerImpl > impl_