[Twisted-Python] StepReactor?

Nicola Larosa nico at tekNico.net
Sat Aug 2 01:09:05 MDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> Come to think of it, is there a way in Twisted to schedule an event at an
>> absolute time, instead of at a relative one?

> Sure.
>
>  reactor.callLater(desiredTime - time.time(), func)
>
> :-).

Of course. :^)


> The reactor stores DelayedCalls with absolute times instead of relative ones
> internally.

That's good to know.


> The callLater API accepts relative times because that's
> generally the most useful to work with.

Very true, and arguably there's no point in coming up with some convention
to specify absolute time, since the above syntax is clear enough.


- --
"I'm a Python fanatic these days, I find that I'm able to program about
three times faster than I could in Java, and I was able to program
in Java about three times faster than I could in C."  Andy Hertzfeld

Nicola Larosa - nico at tekNico.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/K2OPXv0hgDImBm4RAnytAKCR5qWWWY74+t1liIW/3t9//3aZAgCaA4N6
zT/0F9U83zVGYzb09YwqUKQ=
=VD4g
-----END PGP SIGNATURE-----






More information about the Twisted-Python mailing list