Use the millis() function to get the time when the switch BECOMES high. See the state change detection example to determine when the switch becomes high. Also, set a flag.
When the flag is true, see if the switch is still high and what time it is now. If the switch is no longer high, clear the flag and the start time. If the switch is still high and enough time has passed, throw a fit. I mean, set the other pin high.