doc: revisions to clock.py (2)

This commit is contained in:
Zen-CODE 2013-11-16 01:49:11 +02:00
parent 3faeb8a744
commit 0e12c8af86
1 changed files with 3 additions and 2 deletions

View File

@ -57,7 +57,7 @@ to write a short function that does accept dt. For Example::
class Foo(object): class Foo(object):
def start(self): def start(self):
Clock.schedule_interval(self.callback) Clock.schedule_interval(self.callback, 0.5)
def callback(self, dt): def callback(self, dt):
print('In callback') print('In callback')
@ -437,7 +437,8 @@ class ClockBase(_ClockBase):
return ev return ev
def schedule_once(self, callback, timeout=0): def schedule_once(self, callback, timeout=0):
'''Schedule an event in <timeout> seconds. '''Schedule an event in <timeout> seconds. If <timeout> is unspecified
or 0, the callback will be called after the next frame is rendered.
.. versionchanged:: 1.0.5 .. versionchanged:: 1.0.5
If the timeout is -1, the callback will be called before the next If the timeout is -1, the callback will be called before the next