You can create timer by writing this code (sorry, it is c#):
Timer timer = new Timer();
AddChild(timer);
timer.Connect("timeout", this, "OnTimerTimeout");
timer.WaitTime = waitTime;
timer.OneShot = false;
timer.Start();
void OnTimerTimeout()
{
// there should be some code to execute when the timer expires
}
For more detailed information you can look in documentation.