Main Content

seconds

Returns seconds of a time or duration

Description

secs= seconds(time)returns the scalar number,secs, in seconds that represents the same value as the time object,time.

secs= seconds(duration)returns the scalar number,secs, in seconds that represents the same value as the duration object,duration.

Input Arguments

collapse all

ROS or system time, specified as aTimeobject handle. Create aTimeobject usingrostime.

Duration, specified as a ROSDurationobject withSecandNsecproperties. Create aDurationobject usingrosduration.

Output Arguments

collapse all

Total time of theTimeorDurationobject, returned as a scalar in seconds.

See Also

|

Introduced in R2019b