Thanks for the responses guys. I tried the time.time() trick and let
it run for about 2 minutes, and it was precisely counting off one
second each time. Maybe if I let it go for a lot longer, it wouldn't
be as good, or if I started doing other things on the computer?
Anyway, I will go back to the logic of my program for now and see if
maybe I'm just not using the right calculation to fill up the progress
bar (despite the fact that sometimes it fills, and sometimes it
doesn't).
Thanks again.
John
ยทยทยท
---------- Forwarded message ----------
From: Kent Quirk <kent_quirk@cognitoy.com>
To: wxPython-users@lists.wxwidgets.org
Date: Tue, 25 Jul 2006 12:29:23 -0400
Subject: Re: [wxPython-users] wx.Timer accurate?What you need to do is use time.time() to ask the current clock time on
every tick, and calculate an accurate delta from the previous tick.
---------- Forwarded message ----------
From: Christopher Barker <Chris.Barker@noaa.gov>
To: wxPython-users@lists.wxwidgets.org
Date: Tue, 25 Jul 2006 09:33:18 -0700
Subject: Re: [wxPython-users] wx.Timer accurate?wxTimer is not intended to be used this way. It is only approximate. It
gets integrated with the event loop, and can be off by a fair bit,
depending on how long it takes to process other events.What you can do is use a wxTimer to get event approximately when you
want them, and then, when handling that event check the system clock to
see how much time has really passed. For an example, see the AnalogClock
code in the demo.