dur = ros2duration(secs,nsecs)
initializes the duration values for seconds and nanoseconds individually. The function
automatically wraps large values of nsecs, and adds the remainder to
the seconds value of the message, secs.
Total time, specified as a floating-point scalar. The integer portion sets the
sec field, and the remainder sets the nanosec
field of the duration message dur.
secs — Whole seconds 0 (default) | integer
Whole seconds, specified as an integer. This value directly sets to the
sec field of the duration message dur.
Note
The maximum and minimum values for secs are
2147483648 and 2147483647,
respectively.
Nanoseconds, specified as a positive integer. This value directly sets the
nanoSec field of the duration message dur,
unless it is greater than or equal to 109. If so, the
function wraps the value and adds the remainder to the value of
secs.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.