frames += 1
if frames % 100 == 0:
- seconds_per_bullet = elapsed / count
- bullets_per_second = count / elapsed
print " Processing: %04d: %d bullets, %d active." % (
frames, total, count)
- print " %g seconds per bullet (60Hz max: %g)." % (
- seconds_per_bullet, bullets_per_second / 60)
+ if elapsed:
+ print " %g seconds per bullet (60Hz max: %g)." % (
+ seconds_per_bullet = elapsed / count
+ bullets_per_second = count / elapsed
+ seconds_per_bullet, bullets_per_second / 60)
screen.fill([0, 0, 0])
for obj in active: