Timers: How do they work?
#1

I know this is not entirely related to Pawn scripting, but I just can't stop thinking: how do timers work?
I've been asking myself this because I'm developing a pong clone for my programming class, and need to run functions after a determined amount of time, such as speed increasing and menu related stuff. I created a delay function using ticks to better control the speed of the ball, but it just wouldn't work for speed increasing, since I want to increase speed every ten seconds.

What I mean is: How would a SetTimer function look like in assembly code, for example? Would it be like a main loop running constantly and checking if an amount of time has passed? If I'm running a program, which has an order of execution, calling a function by a timer would be like interrupting this order of execution to do another function, and then returning to the original point?

I know these will be newbie questions for some, but I am very curious about this.
Reply


Messages In This Thread
Timers: How do they work? - by waxhunter - 04.06.2012, 21:15
Re: Timers: How do they work? - by leonardo1434 - 04.06.2012, 21:19
Re: Timers: How do they work? - by milanosie - 04.06.2012, 21:20
Re: Timers: How do they work? - by waxhunter - 04.06.2012, 21:23
Re: Timers: How do they work? - by Sandiel - 04.06.2012, 21:23
Re: Timers: How do they work? - by milanosie - 04.06.2012, 21:26
Re: Timers: How do they work? - by ricardo178 - 04.06.2012, 22:02
Re: Timers: How do they work? - by Edward156 - 04.06.2012, 23:08
Re: Timers: How do they work? - by waxhunter - 04.06.2012, 23:21
Re: Timers: How do they work? - by waxhunter - 04.06.2012, 23:47

Forum Jump:


Users browsing this thread: 1 Guest(s)