If you're trying this for smaug, you might want to look into smaug timers. You can defer a command by however much time you want, and then check the status of things at that time. It also can have a variety of different states. I don't recall the details on how to use them, nor do I know any decent documentation for them, I usually just find a function that uses them and hack it into what I want. The search skill uses them, I think.
But from what you described, which I didn't read as closely as I might have, I think you could probably put a timer on a mob and have it call a function that checks your other variable and then acts. And if the condition isn't set, you can always just have the timer reset itself. I believe
you can have timers that call functions while other actions are going through, but I'm not 100% sure on that point. It might interupt when people/mobs enter commands, which would be entirely useless to you.
If that turns out to be the case, though, you could also cheat and make an affect to do it. When AFF_WTFEVER expires, call X function.
And while the timer or affect is in place, the mob/player does nothing (or whatever you define, really)