For example:
In this example I use a while (1) loop but in the real app the while (1) is a while (my $data = <$sock>).my $thread = threads->create("detached_thread"); $_->join for threads->list; sub detached_thread { my $endtime = (time+1800); while (1) { if (time >= $endtime) { print "30 minutes have passed!\n"; exit(0); } } }
Has anyone else ran across this issue? If so what is the deal with it?
In reply to Issue with time() in loop? by Elijah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |