Code:
var timer=0; 
while(timer<3) //3 seconds
{
   timer+=time_step/16;
   wait(1);
}