Using seconds with rtc for less than a minute timer

if((hours == OnHour) && (minutes == OnMinutes) && (seconds == OnSeconds)){
  digitalWrite(PumpPin, HIGH);
}

if((hours == OffHour) && (minutes == OffMinutes) && (seconds == OffSeconds)){
  digitalWrite(PumpPin, LOW);
}

Or if it's important that the start / stop command is only excecuted once (because now it's called for a full second aka thousands of times (does NOT matter for a simple digitalWrite()))

bool motorOn = false;

if((hours == OnHour) && (minutes == OnMinutes) && (seconds == OnSeconds) && !motorOn){
  motorOn = true;
  turnMotorOn(); //whatever that may be
}

if((hours == OffHour) && (minutes == OffMinutes) && (seconds == OffSeconds) && motorOn){
  motorOn = false;
  turnMotorOff(); //whatever that may be
}