Duration

class compas_fab.robots.Duration(secs, nsecs)[source]

Bases: object

Duration consists of two integers: seconds and nanoseconds.

secs

Integer representing number of seconds.

Type

int

nsecs

Integer representing number of nanoseconds.

Type

int

Methods

__init__(secs, nsecs)

Initialize self.

from_data(data)

Construct a duration from its data representation.

to_data()

Return the data dictionary that represents the duration, and from which it can be reconstructed.

Attributes

data

The data representing the duration.

seconds

Returns the duration as floating-point seconds.

__init__(secs, nsecs)[source]

Initialize self. See help(type(self)) for accurate signature.