add method
Returns a new GpsTime that is days
, hours
, minutes
and seconds
later than the current one.
See the GpsTime default constructor for behaviour if the result is outside the valid range.
For autoClamp
parameter see the standard GpsTime constructor.
Implementation
GpsTime add({
int days = 0,
int hours = 0,
int minutes = 0,
int seconds = 0,
bool autoClamp = false,
}) {
return GpsTime(
secondsSinceEpoch +
seconds +
secondsPerMinute * minutes +
secondsPerHour * hours +
secondsPerDay * days,
autoClamp: autoClamp);
}