Public Member Functions | |
def | __add__ |
def | __cmp__ |
def | __eq__ |
def | __getstate__ |
def | __hash__ |
def | __init__ |
def | __repr__ |
def | __setstate__ |
def | __sub__ |
def | from_sec |
def | to_time |
Public Attributes | |
nsecs | |
secs | |
Static Public Attributes | |
tuple | from_sec = staticmethod(from_sec) |
Static Private Attributes | |
list | __slots__ = ['secs', 'nsecs'] |
Time contains the ROS-wide 'time' primitive representation, which consists of two integers: seconds since epoch and nanoseconds since seconds. Time instances are mutable.
Definition at line 187 of file rostime.py.
def include.genpy.rostime.Time.__init__ | ( | self, | |
secs = 0 , |
|||
nsecs = 0 |
|||
) |
Constructor: secs and nsecs are integers. You may prefer to use the static L{from_sec()} factory method instead. :param secs: seconds since epoch, ``int`` :param nsecs: nanoseconds since seconds (since epoch), ``int``
Reimplemented from include.genpy.rostime.TVal.
Definition at line 194 of file rostime.py.
def include.genpy.rostime.Time.__add__ | ( | self, | |
other | |||
) |
Add duration to this time :param other: :class:`Duration`
Definition at line 243 of file rostime.py.
def include.genpy.rostime.Time.__cmp__ | ( | self, | |
other | |||
) |
Compare to another time :param other: :class:`Time`
Reimplemented from include.genpy.rostime.TVal.
Definition at line 266 of file rostime.py.
def include.genpy.rostime.Time.__eq__ | ( | self, | |
other | |||
) |
Equals test for Time. Comparison assumes that both time instances are in canonical representation; only compares fields. :param other: :class:`Time`
Reimplemented from include.genpy.rostime.TVal.
Definition at line 280 of file rostime.py.
def include.genpy.rostime.Time.__getstate__ | ( | self | ) |
support for Python pickling
Definition at line 206 of file rostime.py.
def include.genpy.rostime.Time.__hash__ | ( | self | ) |
Time values are hashable. Time values with identical fields have the same hash.
Reimplemented from include.genpy.rostime.TVal.
Definition at line 291 of file rostime.py.
def include.genpy.rostime.Time.__repr__ | ( | self | ) |
Reimplemented from include.genpy.rostime.TVal.
Definition at line 240 of file rostime.py.
def include.genpy.rostime.Time.__setstate__ | ( | self, | |
state | |||
) |
support for Python pickling
Definition at line 212 of file rostime.py.
def include.genpy.rostime.Time.__sub__ | ( | self, | |
other | |||
) |
Subtract time or duration from this time :param other: :class:`Duration`/:class:`Time` :returns: :class:`Duration` if other is a :class:`Time`, :class:`Time` if other is a :class:`Duration`
Definition at line 253 of file rostime.py.
def include.genpy.rostime.Time.from_sec | ( | float_secs | ) |
Create new Time instance using time.time() value (float seconds) :param float_secs: time value in time.time() format, ``float`` :returns: :class:`Time` instance for specified time
Definition at line 218 of file rostime.py.
def include.genpy.rostime.Time.to_time | ( | self | ) |
Get Time in time.time() format. alias of L{to_sec()} :returns: time in floating point secs (time.time() format), ``float``
Definition at line 232 of file rostime.py.
list include::genpy::rostime.Time::__slots__ = ['secs', 'nsecs'] [static, private] |
Reimplemented from include.genpy.rostime.TVal.
Definition at line 193 of file rostime.py.
tuple include::genpy::rostime.Time::from_sec = staticmethod(from_sec) [static] |
Definition at line 230 of file rostime.py.
Reimplemented from include.genpy.rostime.TVal.
Definition at line 214 of file rostime.py.
Reimplemented from include.genpy.rostime.TVal.
Definition at line 285 of file rostime.py.