class documentation
Time contains the ROS-wide 'time' primitive representation.
It consists of two integers: seconds since epoch and nanoseconds since seconds. Time instances are mutable.
Method | __add__ |
Add duration to this time. |
Method | __cmp__ |
Compare to another time. |
Method | __eq__ |
Equal test for Time. |
Method | __getstate__ |
Support for Python pickling. |
Method | __hash__ |
Time values are hashable. |
Method | __init__ |
Construct time where secs and nsecs are integers. |
Method | __repr__ |
Undocumented |
Method | __setstate__ |
Support for Python pickling. |
Method | __sub__ |
Subtract time or duration from this time. |
Method | to |
Get Time in time.time() format. alias of L{to_sec()}. |
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 |
overrides
niryo_libraries.genpy.TVal.__eq__
Equal test for Time.
Comparison assumes that both time instances are in canonical representation; only compares fields.
Parameters | |
other | Time |
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__
Construct time where secs and nsecs are integers.
You may prefer to use the static L{from_sec()} factory method instead.
Parameters | |
secs | seconds since epoch, int |
nsecs | nanoseconds since seconds (since epoch), int |