The Counting Gate Keeper
TI-Basic, 22 bytes
Fairly simple. Sets a time Ans seconds in the future which we call T which is when the loop stops. While the loop is going, we check for if a key is pressed. It's been a while since I had the fgitw :)
startTmr+Ans-&gt;T
0
While T≠startTmr
Ans+not(not(getKey
End