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.