On Tue, Jan 30, 2001 at 09:43:37AM -0600, Jarkko Hietaniemi wrote:
> I guess it's part of the can of sub-second worms: if we do sleep(),
> people will ask why don't we do time() and alarm(), too.  sleep() and
> alarm() we could get away with more easily, but changing time() to do
> subsecond granularity would be A Bad Thing for backward compatibility.

Sorry, I forgot to mention the translations.  Yes, it becomes:

        sleep(EXPR)     ->      sleep(int(EXPR))
        alarm(EXPR)     ->      alarm(int(EXPR))
        time            ->      int(time)

and that should handle it.  The nice part is it doesn't really require
any code translations, you can get away with overriding the core
functions instead:

        sub sleep { CORE::sleep(int($_[0])); }
        sub alarm { CORE::alarm(int($_[0])); }
        sub time  { int CORE::time }

something like that.  <hand-wave>

-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
That which stirs me, stirs everything.
        -- Squonk Opera, "Spoon"

Reply via email to