I like to use a different approach.

I have a one-shot connected to a flashing LED. If the one-shot is allowed to expire the led will flash. If your software "tickles" the one-shot every pass through the main loop, the one-shot remains re-triggered, and the LED remains off.

This way your LED flashes only if your program stops working.