#NEWLINE# def run( self ) : #NEWLINE# #INDENT# count = 0 #NEWLINE# while ( ( not self . finished . is_set ( ) ) and ( ( self . iterations <= 0 ) or ( count < self . iterations ) ) ) : #NEWLINE# #INDENT# self . finished . wait ( self . interval ) #NEWLINE# if ( not self . finished . is_set ( ) ) : #NEWLINE# #INDENT# self . function ( ) #NEWLINE# self . last_tick = time . time ( ) #NEWLINE# count += 1