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

So is the "if" statement the best way to go? No simple solution for measuring the time spent in an ISR?

Part of the difficulty is that the number of devices and how they are activated changes each time the user uses the device. That means that making a loop is difficult because I may want to turn on many devices simultaneously or single devices at a time or ... etc. If I always turned on the devices one after the other, then it would be easy enough to create a loop that read in the millis() value and the device "location" from vectors and save lots of coding. I just haven't thought how to do it without limiting it's capabilities.

Also, I want to be able to control devices with a minimum delay between them, so I don't want to have to process a bunch of instructions before turning on the next device in case I want to turn a device on very quickly after the first. Maximum, I have 1 ms between turning devices on, which I think is plenty but I don't know.

I'm thinking I may actually write a macro to read in a text file with the time and device information that automatically generates the needed code.