Skip to main content

Duration

A duration of time, composed of seconds and nanoseconds

Parent schema

Duration appears in the SceneEntity message schema.

Schema

fieldtypedescription
secint32The number of seconds in the duration
nsecuint32The number of nanoseconds in the positive direction
note

Foxglove's Protobuf schemas represent duration values with google.protobuf.Duration, which uses seconds and nanos fields. However, in user scripts, message converters, and the rest of Foxglove, the values will appear as sec and nsec fields, for consistency with other data formats.

In Protobuf and FlatBuffers, duration nsec is represented as a signed integer (int32).

Reference implementations

Foxglove schemas are framework-agnostic, and can be implemented using any supported message encoding:

encodingschema
ROS 1std_msgs/Duration
ROS 2builtin_interfaces/msg/Duration
JSONfoxglove.Duration
Protobufgoogle.protobuf.Duration
FlatBuffersfoxglove.Duration
OMG IDLfoxglove::Duration

You must use the schema names specified above for Foxglove to recognize the schema.