delay = 500; nextTime = getTimer() + delay; //в слудующем кадре if (getTimer () > nextTime){ nextTime = getTimer() + delay doSomething(); }