Public Member Functions | |
def | __bool__ |
def | __cmp__ |
def | __eq__ |
def | __ge__ |
def | __gt__ |
def | __hash__ |
def | __init__ |
def | __le__ |
def | __lt__ |
def | __ne__ |
def | __nonzero__ |
def | __repr__ |
def | __str__ |
def | canon |
def | is_zero |
def | set |
def | to_nsec |
def | to_sec |
Public Attributes | |
nsecs | |
secs | |
Static Private Attributes | |
list | __slots__ = ['secs', 'nsecs'] |
list | _slot_types = ['int32', 'int32'] |
Base class of :class:`Time` and :class:`Duration` representations. Representation is secs+nanoseconds since epoch.
Definition at line 52 of file rostime.py.
def include.genpy.rostime.TVal.__init__ | ( | self, | |
secs = 0 , |
|||
nsecs = 0 |
|||
) |
:param secs: seconds. If secs is a float, then nsecs must not be set or 0, larger seconds will be of type long on 32-bit systems, ``int/long/float`` :param nsecs: nanoseconds, ``int``
Reimplemented in include.genpy.rostime.Duration, and include.genpy.rostime.Time.
Definition at line 63 of file rostime.py.
def include.genpy.rostime.TVal.__bool__ | ( | self | ) |
Return if time value is not zero
Definition at line 127 of file rostime.py.
def include.genpy.rostime.TVal.__cmp__ | ( | self, | |
other | |||
) |
Reimplemented in include.genpy.rostime.Duration, and include.genpy.rostime.Time.
Definition at line 173 of file rostime.py.
def include.genpy.rostime.TVal.__eq__ | ( | self, | |
other | |||
) |
Reimplemented in include.genpy.rostime.Duration, and include.genpy.rostime.Time.
Definition at line 182 of file rostime.py.
def include.genpy.rostime.TVal.__ge__ | ( | self, | |
other | |||
) |
>= test for time values
Definition at line 163 of file rostime.py.
def include.genpy.rostime.TVal.__gt__ | ( | self, | |
other | |||
) |
> test for time values
Definition at line 155 of file rostime.py.
def include.genpy.rostime.TVal.__hash__ | ( | self | ) |
Time values are hashable. Time values with identical fields have the same hash.
Reimplemented in include.genpy.rostime.Duration, and include.genpy.rostime.Time.
Definition at line 115 of file rostime.py.
def include.genpy.rostime.TVal.__le__ | ( | self, | |
other | |||
) |
<= test for time values
Definition at line 147 of file rostime.py.
def include.genpy.rostime.TVal.__lt__ | ( | self, | |
other | |||
) |
< test for time values
Definition at line 139 of file rostime.py.
def include.genpy.rostime.TVal.__ne__ | ( | self, | |
other | |||
) |
Definition at line 171 of file rostime.py.
def include.genpy.rostime.TVal.__nonzero__ | ( | self | ) |
Check if time value is not zero
Definition at line 133 of file rostime.py.
def include.genpy.rostime.TVal.__repr__ | ( | self | ) |
Reimplemented in include.genpy.rostime.Duration, and include.genpy.rostime.Time.
Definition at line 124 of file rostime.py.
def include.genpy.rostime.TVal.__str__ | ( | self | ) |
Definition at line 121 of file rostime.py.
def include.genpy.rostime.TVal.canon | ( | self | ) |
Canonicalize the field representation in this instance. should only be used when manually setting secs/nsecs slot values, as in deserialization.
Definition at line 95 of file rostime.py.
def include.genpy.rostime.TVal.is_zero | ( | self | ) |
:returns: ``True`` if time is zero (secs and nsecs are zero), ``bool``
Definition at line 79 of file rostime.py.
def include.genpy.rostime.TVal.set | ( | self, | |
secs, | |||
nsecs | |||
) |
Set time using separate secs and nsecs values :param secs: seconds since epoch, ``int`` :param nsecs: nanoseconds since seconds, ``int``
Definition at line 85 of file rostime.py.
def include.genpy.rostime.TVal.to_nsec | ( | self | ) |
:returns: time as nanoseconds, ``long``
Definition at line 109 of file rostime.py.
def include.genpy.rostime.TVal.to_sec | ( | self | ) |
:returns: time as float seconds (same as time.time() representation), ``float``
Definition at line 103 of file rostime.py.
list include::genpy::rostime.TVal::__slots__ = ['secs', 'nsecs'] [static, private] |
Reimplemented in include.genpy.rostime.Duration, and include.genpy.rostime.Time.
Definition at line 58 of file rostime.py.
list include::genpy::rostime.TVal::_slot_types = ['int32', 'int32'] [static, private] |
Definition at line 61 of file rostime.py.
Reimplemented in include.genpy.rostime.Duration, and include.genpy.rostime.Time.
Definition at line 67 of file rostime.py.
Reimplemented in include.genpy.rostime.Duration, and include.genpy.rostime.Time.
Definition at line 81 of file rostime.py.