mirror of
https://github.com/python/cpython
synced 2024-10-21 23:41:44 +00:00
Finally *tested* effect of fg and bg yield values (and changed them:-)
This commit is contained in:
parent
d617c57dce
commit
0d1069e42f
17
Mac/Lib/test/fgbgtimetest.py
Normal file
17
Mac/Lib/test/fgbgtimetest.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
"""fgbgtest - See how many CPU cycles we get"""
|
||||
|
||||
import time
|
||||
|
||||
loopct = 0L
|
||||
oldloopct = 0L
|
||||
oldt = time.time()
|
||||
|
||||
while 1:
|
||||
t = time.time()
|
||||
if t - oldt >= 1:
|
||||
if oldloopct:
|
||||
print loopct-oldloopct,'in one second'
|
||||
oldloopct = loopct
|
||||
oldt = time.time()
|
||||
loopct = loopct + 1
|
||||
|
Loading…
Reference in a new issue