in reply to Re: spinner to keep the patiently waiting user patient
in thread spinner to keep the patiently waiting user patient

For longer running code in a tight loop, you also need to be aware that at some point $ndx++ stops working. For instance, with normal IEEE doubles:
$ perl -we'$x = $y = 2**53-1; ++$x; print $x-$y' 1 $ perl -we'$x = $y = 2**53; ++$x; print $x-$y' 0
On my computer, in a tight loop, you could reach this point in just 30 years :)

Replies are listed 'Best First'.
Re: Re: Re: spinner to keep the patiently waiting user patient
by RMGir (Prior) on Dec 08, 2003 at 19:26 UTC
    Oh well, if your loop is a bit looser, Y2038 could get you before 2^53 could. :)

    Mike
      Guys, guys, guys! If your spinner is still going after that long a time, I think you have more problems to worry about than counter overflow.

      :-)

       

      perl -le "print+unpack'N',pack'B32','00000000000000000000001010011000'"