PWM motor speed question

void stir(int seconds)
{
  code to ramp up stirring speed
  delay(seconds);
  code to ramp down stirring speed
}

NOTE - this will block execution of any other code including reading button input