Jack Jansen | 0d1069e | 1996-09-22 22:15:20 +0000 | [diff] [blame] | 1 | """fgbgtest - See how many CPU cycles we get""" |
2 | |||||
3 | import time | ||||
4 | |||||
5 | loopct = 0L | ||||
6 | oldloopct = 0L | ||||
7 | oldt = time.time() | ||||
8 | |||||
9 | while 1: | ||||
10 | t = time.time() | ||||
11 | if t - oldt >= 1: | ||||
12 | if oldloopct: | ||||
13 | print loopct-oldloopct,'in one second' | ||||
14 | oldloopct = loopct | ||||
15 | oldt = time.time() | ||||
16 | loopct = loopct + 1 | ||||
17 |