pygame   documentation
||  Home  ||  Help Contents  ||
 
|| pygame || cdrom || constants || cursor || display || draw ||
|| event || font || image || joystick || key || mixer ||
|| mixer_music || mouse || movie || sndarray || surfarray || time ||
|| transform ||
 
|| CD || Channel || Clock || Font || Joystick || Movie ||
|| Overlay || Rect || Sound || Surface ||
 
|| color || cursors || sprite ||

pygame.time

Contains routines to help keep track of time. The timer resolution on most systems is around 10ms.
 
All times are represented in milliseconds, which is simply Seconds*1000. (therefore 2500 milliseconds is 2.5 seconds)
 
You can also create Clock instances to keep track of framerate.
Clock - create a new clock
delay - accurately delay for a number of milliseconds
get_ticks - milliseconds since initialization
set_timer - control timer events
wait - yielding delay for a number of milliseconds

Clock
pygame.time.Clock() -> Clock
 
delay
pygame.time.delay(millseconds) -> time

 
get_ticks
pygame.time.get_ticks() -> int

 
set_timer
pygame.time.set_timer(eventid, milliseconds) -> None
 
wait
pygame.time.wait(millseconds) -> time