On 02/03/2012 08:32 PM, Paul McNett wrote:
> On 2/3/12 9:59 AM, Nick Raptis wrote:
>> I may fire some tests tonight and see if I can confirm the drift, and
>> whether wx.TIMER does any better.
> That would be awesome. The drift argument makes sense to me so I'll be the
> first to
> revert that commit.
Ok, I tested with Dabo r7605 (prior to your commit) on Windows and
Linux. No pure Wx tests for now:
- On Linux, it works identical to your commit as drift is concerned. A
heavy load makes it just drift.
I took a quick look in the Wx source and it seems that they restart
the timer on each hit, because of *strange faults*.
- On Windows, there is no drift, but hits that don't arrive in time get
overlooked.
If you want to test on MacOS, the simplest way to see the behavior is to
add a time.sleep() in the slowTimer callback in dTimer's test case. Then
you can see how the fastTimer behaves.
So, it seems to not matter that much after all. If anything, your
implementation is consistent across platforms.
Anyway, just for fun, I'm attaching a naive diff against r7606 of what
it would take to have a Timer that both doesn't drift AND doesn't miss
hits (not sure if the latter is at all desirable though).
~N
--- StripMime Report -- processed MIME parts ---
multipart/mixed
text/plain (text body -- kept)
text/x-patch
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]