class documentation

class Time(TVal):

Constructor: Time(secs, nsecs)

View In Hierarchy

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_time 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_sec 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_zero No summary
Method set Set time using separate secs and nsecs values.
Method to_nsec No summary
Method to_sec No summary
Class Variable _slot_types Undocumented
def __add__(self, other):

Add duration to this time.

Parameters
otherDuration
def __cmp__(self, other):

Compare to another time.

Parameters
otherTime
def __eq__(self, other):

Equal test for Time.

Comparison assumes that both time instances are in canonical representation; only compares fields.

Parameters
otherTime
def __getstate__(self):

Support for Python pickling.

def __hash__(self):

Time values are hashable.

Time values with identical fields have the same hash.

def __init__(self, secs=0, nsecs=0):

Construct time where secs and nsecs are integers.

You may prefer to use the static L{from_sec()} factory method instead.

Parameters
secsseconds since epoch, int
nsecsnanoseconds since seconds (since epoch), int
def __repr__(self):

Undocumented

def __setstate__(self, state):

Support for Python pickling.

def __sub__(self, other):

Subtract time or duration from this time.

Parameters
otherDuration/Time
Returns
Duration if other is a Time, Time if other is a Duration
def to_time(self):

Get Time in time.time() format. alias of L{to_sec()}.

Returns
time in floating point secs (time.time() format), float
__slots__: list[str] =

Undocumented

nsecs =

Undocumented

secs =

Undocumented