Public Member Functions | |
def | __abs__ |
def | __add__ |
def | __cmp__ |
def | __div__ |
def | __eq__ |
def | __floordiv__ |
def | __getstate__ |
def | __hash__ |
def | __init__ |
def | __mul__ |
def | __neg__ |
def | __repr__ |
def | __setstate__ |
def | __sub__ |
def | __truediv__ |
def | from_sec |
Public Attributes | |
nsecs | |
secs | |
Static Public Attributes | |
tuple | from_sec = staticmethod(from_sec) |
Static Private Attributes | |
list | __slots__ = ['secs', 'nsecs'] |
Duration represents the ROS 'duration' primitive, which consists of two integers: seconds and nanoseconds. The Duration class allows you to add and subtract Duration instances, including adding and subtracting from :class:`Time` instances.
Definition at line 294 of file rostime.py.
def include.genpy.rostime.Duration.__init__ | ( | self, | |
secs = 0 , |
|||
nsecs = 0 |
|||
) |
Create new Duration instance. secs and nsecs are integers and correspond to the ROS 'duration' primitive. :param secs: seconds, ``int`` :param nsecs: nanoseconds, ``int``
Reimplemented from include.genpy.rostime.TVal.
Definition at line 302 of file rostime.py.
def include.genpy.rostime.Duration.__abs__ | ( | self | ) |
Absolute value of this duration :returns: positive :class:`Duration`
Definition at line 344 of file rostime.py.
def include.genpy.rostime.Duration.__add__ | ( | self, | |
other | |||
) |
Add duration to this duration, or this duration to a time, creating a new time value as a result. :param other: duration or time, ``Duration``/``Time`` :returns: :class:`Duration` if other is a :class:`Duration` instance, :class:`Time` if other is a :class:`Time`
Definition at line 353 of file rostime.py.
def include.genpy.rostime.Duration.__cmp__ | ( | self, | |
other | |||
) |
Reimplemented from include.genpy.rostime.TVal.
Definition at line 431 of file rostime.py.
def include.genpy.rostime.Duration.__div__ | ( | self, | |
val | |||
) |
Divide this duration by an integer or float :param val: division factor, ``int/float`` :returns: :class:`Duration` divided by val
Definition at line 404 of file rostime.py.
def include.genpy.rostime.Duration.__eq__ | ( | self, | |
other | |||
) |
Reimplemented from include.genpy.rostime.TVal.
Definition at line 441 of file rostime.py.
def include.genpy.rostime.Duration.__floordiv__ | ( | self, | |
val | |||
) |
Floor divide this duration by an integer or float :param val: division factor, ``int/float`` :returns: :class:`Duration` divided by val
Definition at line 390 of file rostime.py.
def include.genpy.rostime.Duration.__getstate__ | ( | self | ) |
support for Python pickling
Definition at line 311 of file rostime.py.
def include.genpy.rostime.Duration.__hash__ | ( | self | ) |
Time values are hashable. Time values with identical fields have the same hash.
Reimplemented from include.genpy.rostime.TVal.
Definition at line 446 of file rostime.py.
def include.genpy.rostime.Duration.__mul__ | ( | self, | |
val | |||
) |
Multiply this duration by an integer or float :param val: multiplication factor, ``int/float`` :returns: :class:`Duration` multiplied by val
Definition at line 376 of file rostime.py.
def include.genpy.rostime.Duration.__neg__ | ( | self | ) |
:returns: Negative value of this :class:`Duration`
Definition at line 339 of file rostime.py.
def include.genpy.rostime.Duration.__repr__ | ( | self | ) |
Reimplemented from include.genpy.rostime.TVal.
Definition at line 323 of file rostime.py.
def include.genpy.rostime.Duration.__setstate__ | ( | self, | |
state | |||
) |
support for Python pickling
Definition at line 317 of file rostime.py.
def include.genpy.rostime.Duration.__sub__ | ( | self, | |
other | |||
) |
Subtract duration from this duration, returning a new duration :param other: duration :returns: :class:`Duration`
Definition at line 366 of file rostime.py.
def include.genpy.rostime.Duration.__truediv__ | ( | self, | |
val | |||
) |
Divide this duration by an integer or float :param val: division factor, ``int/float`` :returns: :class:`Duration` multiplied by val
Definition at line 420 of file rostime.py.
def include.genpy.rostime.Duration.from_sec | ( | float_seconds | ) |
Create new Duration instance from float seconds format. :param float_seconds: time value in specified as float seconds, ``float`` :returns: :class:`Duration` instance for specified float_seconds
Definition at line 326 of file rostime.py.
list include::genpy::rostime.Duration::__slots__ = ['secs', 'nsecs'] [static, private] |
Reimplemented from include.genpy.rostime.TVal.
Definition at line 301 of file rostime.py.
tuple include::genpy::rostime.Duration::from_sec = staticmethod(from_sec) [static] |
Definition at line 337 of file rostime.py.
Reimplemented from include.genpy.rostime.TVal.
Definition at line 319 of file rostime.py.
Reimplemented from include.genpy.rostime.TVal.
Definition at line 441 of file rostime.py.