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;
160 #endif // ROS_DURATION_H
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
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)
boost::posix_time::time_duration toBoost() const
bool operator<=(const T &rhs) const
Base class for Duration implementations. Provides storage, common functions and operator overloads....
bool operator>=(const T &rhs) const
bool operator==(const T &rhs) const
bool operator>(const T &rhs) const
ROSTIME_DECL void normalizeSecNSecSigned(int64_t &sec, int64_t &nsec)
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
autogenerated on Tue Jun 2 2020 03:31:27