in reply to Putting a timeout into a script

If you want your script to have a timer, running independently of your other code, you need to look into event-based systems. Like POE, Tk, Gtk2 , WxWidgets, etc. These have an event loop, under whose control, you can time-share code blocks.

I'm not really a human, but I play one on earth. flash japh