Duration

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

Bases: object

Duration consists of two values: seconds (float) and nanoseconds (int). The total number of seconds is the sum of these values. The decimal portion of the secs variable is converted to an integer and added to nsecs.

Attributes
  • secs (float) – Float representing number of seconds.

  • nsecs (int) – Integer representing number of nanoseconds.

Methods

from_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.