From: SourceForge.net <noreply@so...>  20030228 14:29:52

Bugs item #627645, was opened at 20021023 15:01 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=120937&aid=627645&group_id=20937 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: A.M. Kuchling (akuchling) Summary: measureTickSize() can fail from low res Initial Comment: if the resolution is really low, this function failed to find a valid interval. here's how i fixed it. def _measureTickSize(self): # _measureTickSize() tries to estimate a rough average of the # resolution of time that you can see from Python. It does # this by measuring the time 100 times, computing the delay # between measurements, and taking the median of the resulting # list. interval = [0] * 100 # Compute 100 differences t=time.time() for i in range(0,100): t2=time.time() delta=int((t2t)*1e6) t=t2 if delta: interval[i] = delta # Take the median of the array of intervals avg = reduce(lambda x, y: x+y, interval) avg = ((avg+1)/len(interval))+1 self._ticksize=avg  Comment By: Robert Olson (olson) Date: 20021106 11:29 Message: Logged In: YES user_id=20112 I ran into this as well on Windows. My solution was to use time.clock() instead of time.time() on windows; time.clock() uses the windows hires clocks and works great for this. I've submitted patch 634515 for this.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=120937&aid=627645&group_id=20937 