class documentation

class Duration(genpy.Duration):

Constructor: Duration(secs, nsecs)

View In Hierarchy

Duration represents the ROS 'duration' primitive type, which consists of two integers: seconds and nanoseconds. The Duration class allows you to add and subtract Duration instances, including adding and subtracting from L{Time} instances.

Usage::

five_seconds = Duration(5) five_nanoseconds = Duration(0, 5)

print 'Fields are', five_seconds.secs, five_seconds.nsecs

# Duration arithmetic ten_seconds = five_seconds + five_seconds five_secs_ago = rospy.Time.now() - five_seconds # Time minus Duration is a Time

true_val = ten_second > five_seconds

Method __init__ Create new Duration instance. secs and nsecs are integers and correspond to the ROS 'duration' primitive type.
Method __repr__ Undocumented
Class Variable __slots__ Undocumented
def __init__(self, secs=0, nsecs=0):

Create new Duration instance. secs and nsecs are integers and correspond to the ROS 'duration' primitive type.

@param secs: seconds @type secs: int @param nsecs: nanoseconds @type nsecs: int

def __repr__(self):

Undocumented

__slots__: list =

Undocumented