#!/usr/bin/python from core.event import EventDispatcher from core.view import SDLView from core.controller import KeyboardController, CPUIdler from balls.model import Ball, BallSimulation from balls.controller import BallController f = open("bench-nointer", "w") for i in range(1, 100): # Event dispatcher disp = EventDispatcher() # View v = SDLView(disp, w=274, h=274, zoom=1) # Models s = BallSimulation(disp, 25, 25, i) # Controllers k = KeyboardController(disp) c = CPUIdler(disp) bc = BallController(disp) t = c.idle(cycles=100) f.write(str(i) + " " + str(t) + "\n") f.close()