On m�ndag, sep 23, 2002, at 12:00 Europe/Stockholm, Martin Roos wrote:

>
> should i lock the $clockstr before reading/writing it ?
> in Java i didn't have to lock 'non-object' variables, the VM
> did it for me, dunno about perl :(
>

No you don't need to lock, you only write to it at one place.


> ps. does anyone know a nicer way to sleep a bit , like 0.010-0.050 
> msec ?
> the yield thing still kills the cpu dead but it at least let's some 
> other
> process make their moves, without it the program will almost hang an 
> older
> machine :( still a little sleep would be nicer
>
>  Martin


use Time::HiRes qw(sleep)

Arthur

Reply via email to