a simple clock abstraction of time

29 views
Skip to first unread message

Johan Rydberg

unread,
Apr 18, 2012, 5:20:36 AM4/18/12
to gev...@googlegroups.com
Someone might find this interesting, or useful.

https://gist.github.com/2412129

Coming from the Twisted world you often miss twisted.internet.task.Clock,
or reactor.callLater.

Matthias Urlichs

unread,
Apr 18, 2012, 7:29:57 AM4/18/12
to gev...@googlegroups.com
Hi,

Johan Rydberg:


> Someone might find this interesting, or useful.
>
> https://gist.github.com/2412129
>

Line 71 looks like an endless recursion loop.

Test cases are useful. :-P

> Coming from the Twisted world you often miss twisted.internet.task.Clock,
> or reactor.callLater.

The code I'm writing right now needs both kinds of clock, unfortunately –
some delays may advance indiscriminately, but others are timeouts for
network communication. I have hacked the Twisted reactor emulator I'm using
to support that.

(Yes, I know I should put that into its own git archive and publish it …)

Damien Churchill

unread,
Apr 18, 2012, 7:55:26 AM4/18/12
to gev...@googlegroups.com
On 18 April 2012 12:29, Matthias Urlichs <matt...@urlichs.de> wrote:
> Hi,
>
> Johan Rydberg:
>> Someone might find this interesting, or useful.
>>
>>   https://gist.github.com/2412129
>>
> Line 71 looks like an endless recursion loop.
>

Not at all, it's calling reset which is a function passed in by
whatever created the class.

Reply all
Reply to author
Forward
0 new messages