#NEWLINE# def _scheduleNextConsensusDownload( self ) : #NEWLINE# #INDENT# from twisted.internet import reactor #NEWLINE# va = time . mktime ( self . _consensus . valid_after . utctimetuple ( ) ) #NEWLINE# fu = time . mktime ( self . _consensus . fresh_until . utctimetuple ( ) ) #NEWLINE# vu = time . mktime ( self . _consensus . valid_until . utctimetuple ( ) ) #NEWLINE# i1 = ( ( fu - va ) * ( 3.0 / 4.0 ) ) #NEWLINE# i2 = ( ( vu - ( fu + i1 ) ) * ( 7.0 / 8.0 ) ) #NEWLINE# seconds = random . randrange ( int ( i1 ) , int ( fu ) ) #NEWLINE# reactor . callLater ( seconds , self . _scheduledConsensusUpdate )