Add debug timer to Boyd.tick
authorNeil <neil@dip.sun.ac.za>
Sat, 10 Sep 2016 17:04:06 +0000 (19:04 +0200)
committerNeil <neil@dip.sun.ac.za>
Sat, 10 Sep 2016 17:04:14 +0000 (19:04 +0200)
tabakrolletjie/enemies.py

index cca4ce1bfa079db0f6880fc4669b04890d5e1d99..333c8270b8a92b3ddc358aef9fbd28983ab98e60 100644 (file)
@@ -13,6 +13,7 @@ from .constants import (SCREEN_SIZE, MOULD_CATEGORY, OBSTACLE_CATEGORY,
 from .loader import loader
 from .sound import sound
 from .transforms import Multiply
+from .utils import debug_timer
 
 MOULD_FILTER = pymunk.ShapeFilter(
     mask=MOULD_CATEGORY | OBSTACLE_CATEGORY,
@@ -205,6 +206,7 @@ class Boyd(object):
                 self._image.blit(m.get_eyeball(), m.pygame_pos(self._image),
                                  None, 0)
 
+    @debug_timer('Boyd.tick')
     def tick(self, gamestate, space, lights):
         redraw = False
         # Handle spawn events