I looked at the help and the sample of "onTimer" and I'm not sure if I understood it entirely ...
The current sample seem to me like a "delay / pause" command: "start something - pause it - continue it".
I don't understand how to define a timer which is "independent" from a command (sorry for my unprofessional wording). Simple example - create a "race of line-drawing", based on a count-down of 10 seconds:
start timer for 10 seconds (countdown)
while timer is running
draw as many lines as you are able to
if timer is down to 0
alert "Game over"
Maybe I misunderstand the basic target of a timer, but is it possible to make a code like this?
What you describe is not a suitable use for OnTimer. For your scenario, you would simply check the system clock before starting the loop, then check the system clock inside the loop and break out when the clock reaches a certain time. OnTimer is for triggering an event in the future, while normal system activity continues in the meantime.