time while loop

How do i set up a while loop for a period of time? like one second? thnks

More questions in this forum