How to loop using time

So how would I go about doing this: looping something every N seconds for N seconds?
Registered users can post here. Sign in or register to post.