<html><title>pygame.time</title><bodybgcolor=#ddddddtext=#333377link=#7777bbvlink=#7777bb><tableborder=0width=100%cellpadding=0cellspacing=0bgcolor=#f5f5f5><trvalign=top><tdrowspan=2><tableborder=0cellpadding=5cellspacing=0bgcolor=#333377><trheight=86align=left><tdvalign=middle><fontcolor=#ffffffsize=+5><ahref=../index.html><fontsize=+5color=#ffffff><i><b> pygame</b></i></font></a>&nbsp;&nbsp;</td><tdvalign=middle><tt><fontcolor=#dddddd><br> PyGame<br>Documentation</font></td></tr></table></td><tdwidth=100%align=centervalign=middle> ||&nbsp;<ahref=http://pygame.seul.org>Home</a>&nbsp;||&nbsp;<ahref=../index.html>Help Contents</a>&nbsp;||
<br>&nbsp;<br>|| <ahref=CD.html>CD</a> ||
<ahref=Channel.html>Channel</a> ||
<ahref=Font.html>Font</a> ||
<ahref=Joystick.html>Joystick</a> ||
<ahref=Rect.html>Rect</a> ||
<ahref=Sound.html>Sound</a> ||
<ahref=Surface.html>Surface</a> ||<br>|| <ahref=pygame.html>pygame</a> ||
<ahref=pygame_cdrom.html>cdrom</a> ||
<ahref=pygame_constants.html>constants</a> ||
<ahref=pygame_display.html>display</a> ||
<ahref=pygame_event.html>event</a> ||
<ahref=pygame_font.html>font</a> ||
<ahref=pygame_image.html>image</a> ||<br>|| <ahref=pygame_joystick.html>joystick</a> ||
<ahref=pygame_key.html>key</a> ||
<ahref=pygame_mixer.html>mixer</a> ||
<ahref=pygame_mixer_music.html>mixer_music</a> ||
<ahref=pygame_mouse.html>mouse</a> ||
<ahref=pygame_music.html>music</a> ||
<ahref=pygame_surfarray.html>surfarray</a> ||<br>|| <ahref=pygame_time.html>time</a> ||<br></td></tr></table><br><h2align=center>pygame.time</h2>Contains routines to help keep track of time. The timer
resolution on most systems is around 10ms.
<br>&nbsp;<br>All times are represented in milliseconds, which is simply
Seconds*1000.(therefore 2500 milliseconds is 2.5 seconds)
<hr><table><tr><td><ahref=#delay>delay</a></td><td> -
delay for a number of milliseconds</td></tr><tr><td><ahref=#get_ticks>get_ticks</a></td><td> -
milliseconds since startup</td></tr><tr><td><ahref=#set_timer>set_timer</a></td><td> -
control timer events</td></tr></table><hr><aname=delay><fontsize=+2><b>delay
</b></font><br><fontsize=+1><tt>pygame.time.delay(millseconds) -> none
</tt></font><ul>Will pause for a given number of milliseconds.
</ul><br>&nbsp;<br><aname=get_ticks><fontsize=+2><b>get_ticks
</b></font><br><fontsize=+1><tt>pygame.time.get_ticks() -> int
</tt></font><ul>This is the time in milliseconds since the pygame.time was
imported.
</ul><br>&nbsp;<br><aname=set_timer><fontsize=+2><b>set_timer
</b></font><br><fontsize=+1><tt>pygame.time.set_timer([millseconds, eventid]) -> int
</tt></font><ul>Every given number of milliseconds, a new event with
the given event id will be placed on the event queue.
The timer will run indefinitely, until <u>set_timer()</u> is
called with no arguments. Calling with no arguments stops
the running timer.
</ul><br>&nbsp;<br><hr></body></html>