diff options
author | Raymond Hettinger <python@rcn.com> | 2008-01-17 23:32:01 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-01-17 23:32:01 (GMT) |
commit | 497fdbf76739616c51982955a55270242634551f (patch) | |
tree | ba68b26e82722866a998dc97d4384672857d6bf4 /Doc | |
parent | ff6cc6b8efae71ec3fff3f60ef73be62811b7b06 (diff) | |
download | cpython-497fdbf76739616c51982955a55270242634551f.zip cpython-497fdbf76739616c51982955a55270242634551f.tar.gz cpython-497fdbf76739616c51982955a55270242634551f.tar.bz2 |
Fix-up Timer() example.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/sched.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst index e9619fb..f9e81f0 100644 --- a/Doc/library/sched.rst +++ b/Doc/library/sched.rst @@ -57,14 +57,15 @@ Example:: >>> def print_some_times(): ... print time.time() ... Timer(5, print_time, ()).start() - ... Timer(10, 1, print_time, ()) - ... print time.time() # executes before the time-delay events + ... Timer(10, print_time, ()).start() + ... time.sleep(11) # sleep while time-delay events execute + ... print time.time() ... >>> print_some_times() 930343690.257 - 930343690.301 From print_time 930343695.274 From print_time 930343700.273 + 930343701.301 .. _scheduler-objects: |