From 0d1069e42fe5ec73954a48c910e0e89ce663f829 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Sun, 22 Sep 1996 22:15:20 +0000 Subject: [PATCH] Finally *tested* effect of fg and bg yield values (and changed them:-) --- Mac/Lib/test/fgbgtimetest.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Mac/Lib/test/fgbgtimetest.py diff --git a/Mac/Lib/test/fgbgtimetest.py b/Mac/Lib/test/fgbgtimetest.py new file mode 100644 index 00000000000..fd2b64956cd --- /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 +