How do you check for an event that could happen at any random time?

The correct answer is "Use interrupts to monitor for the event"