operator + method
Implementation
RosTime operator +(RosTime other) {
final secs = this.secs + other.secs;
final nsecs = this.nsecs + other.nsecs;
const nsecsInSec = 1000000000;
if (nsecs >= nsecsInSec) {
return RosTime(
secs: secs + nsecs ~/ nsecsInSec, nsecs: nsecs % nsecsInSec);
}
return RosTime(secs: secs, nsecs: nsecs);
}