Quoting Roger Merchberger <[EMAIL PROTECTED]>: > I really only need between 500 and 1000 samples per second, but as the > smallest sleep available normally is time.sleep(.01) -- which brings my > samples/sec to a nice 100; but I need it a little faster.
Where did you find that out? > 2) will upgrading to a newer version of Python get me what I need? > [[ I looked thru the "New in 2.4" dox and nothing I needed was > listed...]] I just did some experimenting ... I am running ActiveState Python 2.4.1 under Windows XP / cygwin. >>> def check(): ... now = time.clock() ... for i in xrange(10000): ... time.sleep(0.001) ... print time.clock() - now ... >>> check() 11.2695306247 >>> def check(): ... now = time.clock() ... for i in xrange(100000): ... time.sleep(0.0001) ... print time.clock() - now ... >>> check() 2.77601985727 >>> check() 8.70900742972 The first test is fairly consistent with time.sleep(0.001) doing what you expect. The second is a bit puzzling to me, though... -- John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor