Interrupt: Need to keep track of time spent in routine or ... ?

tms8c8:
... that was the whole point of question. I wanted to keep track of the time spent in interrupt so I could "fix" the millis() value.

With interrupts disabled (as they are inside an interrupt) you can't keep track of time any more. Thus you can't "fix" the millis() value. The approach is fundamentally flawed.

From what you've described some sort of table of devices that are currently turned off would be all you require, and after X milliseconds elapse, you turn them on again and remove them from the table.

One approach that springs to mind BTW is just to use a RTC (real time clock) external chip. That will give you your "actual time" regardless of what the program is doing.