Go to the documentation of this file.
35 #ifndef ROS_DURATION_H
36 #define ROS_DURATION_H
45 #pragma warning(disable: 4244)
46 #pragma warning(disable: 4661)
57 namespace posix_time {
87 inline bool operator!=(
const T &rhs)
const {
return !(*
static_cast<const T*
>(
this) == rhs); }
92 double toSec()
const {
return static_cast<double>(
sec) + 1e-9*
static_cast<double>(
nsec); };
93 int64_t
toNSec()
const {
return static_cast<int64_t
>(
sec)*1000000000ll +
static_cast<int64_t
>(
nsec); };
97 boost::posix_time::time_duration
toBoost()
const;
191 #endif // ROS_DURATION_H
static const T HOUR
One hour duration.
WallDuration(int32_t _sec, int32_t _nsec)
ROSTIME_DECL std::ostream & operator<<(std::ostream &os, const Duration &rhs)
T & operator*=(double scale)
const ROSTIME_DECL Duration DURATION_MIN
static const T DAY
One day duration.
Duration(int32_t _sec, int32_t _nsec)
bool operator!=(const T &rhs) const
const ROSTIME_DECL Duration DURATION_MAX
T operator*(double scale) const
T & operator+=(const T &rhs)
static const T MICROSECOND
One microsecond duration.
static const T MILLISECOND
One millisecond duration.
static const T MIN
Minimum representable duration (negative)
boost::posix_time::time_duration toBoost() const
static const T ZERO
Zero duration.
bool operator<=(const T &rhs) const
Base class for Duration implementations. Provides storage, common functions and operator overloads....
static const T SECOND
One second duration.
bool operator>=(const T &rhs) const
static const T NANOSECOND
One nanosecond duration.
bool operator==(const T &rhs) const
static const T MAX
Maximum representable duration.
bool operator>(const T &rhs) const
ROSTIME_DECL void normalizeSecNSecSigned(int64_t &sec, int64_t &nsec)
static const T MINUTE
One minute duration.
Class to help run loops at a desired frequency.
bool operator<(const T &rhs) const
Duration representation for use with the WallTime class.
Duration representation for use with the Time class.
T & operator-=(const T &rhs)
T operator+(const T &rhs) const
rostime
Author(s): Josh Faust, Dirk Thomas
autogenerated on Sat Jun 17 2023 02:32:37