summaryrefslogtreecommitdiffstats
path: root/Mac/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-09-22 22:15:20 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-09-22 22:15:20 (GMT)
commit0d1069e42fe5ec73954a48c910e0e89ce663f829 (patch)
tree1cc09fcfd0b443299b9dd277df2889af9233b6eb /Mac/Lib
parentd617c57dce0db9a742cd342bff9bea2a5aa80071 (diff)
downloadcpython-0d1069e42fe5ec73954a48c910e0e89ce663f829.zip
cpython-0d1069e42fe5ec73954a48c910e0e89ce663f829.tar.gz
cpython-0d1069e42fe5ec73954a48c910e0e89ce663f829.tar.bz2
Finally *tested* effect of fg and bg yield values (and changed them:-)
Diffstat (limited to 'Mac/Lib')
-rw-r--r--Mac/Lib/test/fgbgtimetest.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/Mac/Lib/test/fgbgtimetest.py b/Mac/Lib/test/fgbgtimetest.py
new file mode 100644
index 0000000..fd2b649
--- /dev/null
+++ b/Mac/Lib/test/fgbgtimetest.py
@@ -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
+