blob: fd2b64956cd64ab3d414ab897d96586df338bef5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
|