www.gusucode.com > robotics 案例源码程序 matlab代码 > robotics/GetSecondsFromATimeObjectExample.m

    %% Get Seconds From A |Time| Object
% Use the |seconds| function to get the total seconds of a |Time| object
% from its |Secs| and |Nsecs| properties.

%%
% Create a |Time| object.
time = rostime(1,860000000)

%%
% Get the total seconds from the time object.
secs = seconds(time)