From: Aldric Giacomoni <"aldric[remove]"@...> Date: 2008-12-05T03:44:16+09:00 Subject: Re: Force a program to stop if runtime exceeds given duration Glen Holcomb wrote: > > You could have two threads, your main thread and a sub-thread. At the > beginning of execution put the sub-thread to sleep for 5 hours (18000 > seconds). Then put whatever code you want in the main thread. After 5 > hours the sub-thread will wake (assuming there is no blocking I/O or other > impediment). In the sub-thread simply call exit. > > This is an insanely simple example though. > I think .. Your simple example actually fits my needs :) Thanks for the help and the various hints about thinking in threads.