class documentation
Duration represents the ROS 'duration' primitive.
It consists of two integers: seconds and nanoseconds.
The Duration class allows you to add and subtract Duration instances,
including adding and subtracting from Time instances.
| Method | __abs__ |
Absolute value of this duration. |
| Method | __add__ |
Add duration to this duration, or this duration to a time, creating a new time value as a result. |
| Method | __cmp__ |
Undocumented |
| Method | __div__ |
Divide this duration by an integer or float. |
| Method | __divmod__ |
Implement the builtin divmod for a pair of Durations. |
| Method | __eq__ |
Undocumented |
| Method | __floordiv__ |
Floor divide this duration by an integer or float. |
| Method | __getstate__ |
Support for Python pickling. |
| Method | __hash__ |
Time values are hashable. |
| Method | __init__ |
Create new Duration instance. secs and nsecs are integers and correspond to the ROS 'duration' primitive. |
| Method | __mod__ |
Find the remainder when dividing this Duration by another Duration. |
| Method | __mul__ |
Multiply this duration by an integer or float. |
| Method | __neg__ |
No summary |
| Method | __repr__ |
Undocumented |
| Method | __setstate__ |
Support for Python pickling. |
| Method | __sub__ |
Subtract duration from this duration, returning a new duration. |
| Method | __truediv__ |
Divide this duration by an integer or float. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | nsecs |
Undocumented |
| Instance Variable | secs |
Undocumented |
Inherited from TVal:
| Class Method | from |
Create new TVal instance using time.time() value (float seconds). |
| Method | __ge__ |
>= test for time values. |
| Method | __gt__ |
> test for time values. |
| Method | __le__ |
<= test for time values. |
| Method | __lt__ |
< test for time values. |
| Method | __ne__ |
Undocumented |
| Method | __nonzero__ |
Return if time value is not zero. |
| Method | __str__ |
Undocumented |
| Method | canon |
Canonicalize the field representation in this instance. |
| Method | is |
No summary |
| Method | set |
Set time using separate secs and nsecs values. |
| Method | to |
No summary |
| Method | to |
No summary |
| Class Variable | _slot |
Undocumented |
Implement the builtin divmod for a pair of Durations.
| Returns | |
Duration The remaining time after the division |
overrides
niryo_libraries.genpy.TVal.__hash__Time values are hashable.
Time values with identical fields have the same hash.
overrides
niryo_libraries.genpy.TVal.__init__Create new Duration instance. secs and nsecs are integers and correspond to the ROS 'duration' primitive.
| Parameters | |
| secs | seconds, int |
| nsecs | nanoseconds, int |
Find the remainder when dividing this Duration by another Duration.
| Returns | |
Duration The remaining time after the division |
Multiply this duration by an integer or float.
| Parameters | |
| val | multiplication factor, int/float |
| Returns | |
Duration multiplied by val | |
Subtract duration from this duration, returning a new duration.
| Parameters | |
| other | duration |
| Returns | |
Duration | |