[Tutor] timed functions? Timeouts?

Alan Gauld alan.gauld at btinternet.com
Tue May 20 02:12:42 CEST 2008


"W W" <srilyk at gmail.com> wrote

> The specific bit I'm looking at is this line
> 
>   the_timeout = setTimeout('writeTime();',500);
> 
> basically it calls the function again in 500ms, but rather than
> pausing, I guess it spawns a new thread? I'm not really sure.

You might be able to use select() for this.

Or if in a GUI environment just create a timer.

Or create a thread and use sleep() within the thread.

Just some ideas at 01:10am. So they are probably mince!

Night all,

Alan G



More information about the Tutor mailing list