Simplest timed loop script ever please

in no actionscripter but does anyone have the simplest timed loop using if else and variables?

like, if i put in 2000 (for 2 seconds) as the time i want it to loop for, then once that times up
it breaks and goes to the next frame.

does this few lines of script/holy grail exist even? :puzzle: