Turning on and off buzzer after certain time

horace:
something along the lines of

void loop()

{
  if(alarm)
    {
    delay (10000);
    tone(piezoPin, 10000, 5000);
}



when the alarm goes off after ten seconds the buzzer sounds for 5 seconds
what is your 'alarm' condition

I think I'm beginning to see your point. However, as of now, the alarm condition is the 10 seconds after uploading the code into the Arduino. Is that possible?