#NEWLINE# def __init__( self , machine ) : #NEWLINE# #INDENT# self . timers = set ( ) #NEWLINE# self . timers_to_remove = set ( ) #NEWLINE# self . timers_to_add = set ( ) #NEWLINE# self . log = logging . getLogger ( 'Timing' ) #NEWLINE# self . machine = machine #NEWLINE# try : #NEWLINE# #INDENT# Timing . HZ = self . machine . config [ 'timing' ] [ 'hz' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# Timing . HZ = 30 #NEWLINE# #UNINDENT# self . log . debug ( 'Configuring system Timing for %sHz' , Timing . HZ ) #NEWLINE# Timing . secs_per_tick = ( 1 / float ( Timing . HZ ) ) #NEWLINE# Timing . ms_per_tick = ( 1000 * Timing . secs_per_tick )