<s> from time import time <EOL> class FPS_Monitor ( object ) : <EOL> def __init__ ( self , delta = <NUM_LIT> ) : <EOL> super ( FPS_Monitor , self ) . __init__ ( ) <EOL> self . time = time ( ) <EOL> self . frame_count = <NUM_LIT:0> <EOL> self . print_time = delta <EOL> def increment_frame ( self ) : <EOL> self . frame_count += <NUM_LIT:1> <EOL> new_time = time ( ) <EOL> diff = new_time - self . time <EOL> if diff > self . print_time : <EOL> print "<STR_LIT>" , float ( self . frame_count ) / diff <EOL> self . time = new_time <EOL> self . frame_count = <NUM_LIT:0> </s>
