I would just sample periodically at some close but not equal to 1kHz rate, and look for the last time the signal went HIGH. If the difference between NOW and that time exceeds some interval, it's flashing. If the difference between NOW and that time is greater than one flash cycle time, it's OFF.