Should delay() work when interrupts are disabled?

I'm running an UNO Rev2, Arduino Software 0023, on Windows XP, SP3.

Having read the docs for delay() to see if there are any issues with interrupts... http://arduino.cc/en/Reference/Delay

I'm curious as to why delay(1000) doesn't wait for 1000ms when I have interrupts disabled

void myfunc(void)
{
  noInterrupts();
  Serial.print("BEFORE ");
  digitalWrite(8,LOW);
  delay(1000);
  Serial.println("\nAFTER");
  interrupts();
  
}

I see BEFORE and AFTER immediately. There is no 1 second delay between them.

Why is delay() not working?

I'm curious as to why delay(1000) doesn't wait for 1000ms  when I have interrupts disabled

Because millis() requires interrupts to be enabled. The delay() function calls millis() to see if it has wasted enough time.

Why are you disabling interrupts?

PaulS:

I'm curious as to why delay(1000) doesn't wait for 1000ms  when I have interrupts disabled

Because millis() requires interrupts to be enabled. The delay() function calls millis() to see if it has wasted enough time.

Why are you disabling interrupts?

To avoid triggering INT0 when disabling power on the device the Arduino is connected to.

Arduino—PIN8—>Device (PIN8 controls PWR to the device)

Arduino—PIN2<—Device (Device triggers interrupts, Arduino counts the interrupts)

I guess I could It seems as though the only solution is to detachInterrupts(), although I hadn’t thought about that when I posted the first message.