Can I test in ui while loop if calendar event is active?

You may also want to keep an eye on: