add method

GpsTime add(
  1. {int days = 0,
  2. int hours = 0,
  3. int minutes = 0,
  4. int seconds = 0,
  5. bool autoClamp = false}
)

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);
}