PaulS:
What "value" does the timer have? What analog output would 27 seconds correspond to?
I would have a timer that counts the milliseconds the button is being held. Can't I map the values into a 0-1023 scale? lets' say 10 secs would be my 1023 output value and anything in between 0 and 10000 ms scaled accordingly. Whatever value greater than 10 secs I wouldn't consider it.
PaulS:
PWM is the only way to have analog output.
What I understand from your answer is that I can't do the thing I was planning to.