views:

637

answers:

4

See title .. !

A: 
import time
time.sleep (50.0 / 1000.0);
Dan Olson
+2  A: 

A quick look at google tells me: time.sleep -

http://docs.python.org/library/time.html

Alterlife
+6  A: 
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from time import sleep
>>> sleep(0.05)
>>>
Will Boyce
+3  A: 

Note that if you rely on sleep taking exactly 50ms, you won't get that. It will just be about it.

ya23
Around about is generally good enough, the simulation Im doing doesn't need to be precise
TK
It might be 10 or 15ms longer than that on some platforms, so be warned.
Kylotan