Namespaces | Functions
time_utils.hpp File Reference

Utilities for working with time. More...

#include <ros/duration.h>
#include <ros/rate.h>
#include <ros/time.h>
Include dependency graph for time_utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 cras
 
 ros
 

Functions

double cras::frequency (const ::ros::Rate &rate, bool maxCycleTimeMeansZero=false)
 Return the frequency represented by the given rate. More...
 
double cras::frequency (const ::ros::WallRate &rate, bool maxCycleTimeMeansZero=false)
 Return the frequency represented by the given rate. More...
 
::ros::Time cras::nowFallbackToWall ()
 Return current ROS time if it has already been initialized, or current wall time. More...
 
::ros::Duration ros::operator* (const ::ros::Duration &val1, const ::ros::Duration &val2)
 Multiply two durations. The units of the result are [s^2]. More...
 
::ros::WallDuration ros::operator* (const ::ros::WallDuration &val1, const ::ros::WallDuration &val2)
 Multiply two durations. The units of the result are [s^2]. More...
 
::ros::Duration ros::operator/ (const ::ros::Duration &numerator, const ::ros::Duration &denominator)
 Divide duration val1 by val2. The result is unitless. More...
 
::ros::WallDuration ros::operator/ (const ::ros::WallDuration &numerator, const ::ros::WallDuration &denominator)
 Divide duration val1 by val2. The result is unitless. More...
 
bool ros::operator== (const ::ros::Rate &r1, const ::ros::Rate &r2)
 Test two rates for equality. More...
 
bool ros::operator== (const ::ros::WallRate &r1, const ::ros::WallRate &r2)
 Test two rates for equality. More...
 
::ros::Duration cras::remainingTime (const ::ros::Time &query, double timeout)
 Return remaining time to timeout from the query time. More...
 
::ros::Duration cras::remainingTime (const ::ros::Time &query, const ::ros::Duration &timeout)
 Return remaining time to timeout from the query time. More...
 
::ros::Rate cras::safeRate (double frequency)
 Return a rate representing the given frequency. If the frequency is zero or too small, return min/max representable rate. More...
 
::ros::WallRate cras::safeWallRate (double frequency)
 Return a rate representing the given frequency. If the frequency is zero or too small, return min/max representable rate. More...
 

Detailed Description

Utilities for working with time.

Author
Martin Pecka SPDX-License-Identifier: BSD-3-Clause SPDX-FileCopyrightText: Czech Technical University in Prague

Definition in file time_utils.hpp.



cras_cpp_common
Author(s): Martin Pecka
autogenerated on Sat Jun 17 2023 02:32:53