Interrupt running delay


i have a program that runs on the arduino , it sends a get request to a php script on a webserver which then, sends back a batch of data back to the arduino like : 12-10-2011,17:23:03,@user,#command,message

my loop starts, then waits for 15 seconds and goes and checks twitter for the last command and gets it back, if the user&command is the same as the last, dont do nothing. if its a new command or user, execute the command . for example

@bob said: @shitake #led1 i hope it looks cool would make my arduino know that, bob wants it to turn led1 to "on", and that the message he wants to deliver is "i hop...."

ok this works FINE.

at first i was having the get request triggered by a button. i now want to use them both together for further experimentation and extendability.

how can i implement some kind of timer, which triggers a specific function after n amount of time??

thx for reply.

The MsTimer2 library should do what you want.