#NEWLINE# def get_progress( self ) : #NEWLINE# #INDENT# 'How much more time before the final materialization.' #NEWLINE# next = mktime ( self . nextMaterializedTime ) #NEWLINE# start = mktime ( self . startTime ) #NEWLINE# end = mktime ( self . endTime ) #NEWLINE# if ( end != start ) : #NEWLINE# #INDENT# progress = min ( int ( ( ( 1 - ( ( end - next ) / ( end - start ) ) ) * 100 ) ) , 100 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# progress = 100 #NEWLINE# #UNINDENT# action_count = float ( len ( self . actions ) ) #NEWLINE# if ( ( start != 0 ) and ( progress == 100 ) ) : #NEWLINE# #INDENT# progress = int ( ( ( sum ( [ action . is_finished ( ) for action in self . actions ] ) / action_count ) * 100 ) ) #NEWLINE# #UNINDENT# return progress