How to include delay in while loop

Some reading; there are more articles on this site and on the web.