On a resource rich system, you can implement a two-timer solution, with one setting the pin and another clearing it.