def _LogProgressUpdateIfReasonable(self):
    """Prints a progress update if enough time has passed."""
    next_log_time = (
        self._time_of_last_status_log +
        self.SECONDS_BETWEEN_STATUS_LOG_MESSAGES)
    current_time = time.time()
    if current_time < next_log_time:
      return
    completion_time = time.ctime(current_time + self.EstimateTimeRemaining())
    log_message = (
        '{0:s} hash analysis plugin running. {1:d} hashes in queue, '
        'estimated completion time {2:s}.'.format(
            self.NAME, self.hash_queue.qsize(), completion_time))
    logger.info(log_message)
    self._time_of_last_status_log = current_time
def _LogProgressUpdateIfReasonable ( self ) : next_log_time = ( self . _time_of_last_status_log + self . SECONDS_BETWEEN_STATUS_LOG_MESSAGES ) current_time = time . time ( ) if current_time < next_log_time : return completion_time = time . ctime ( current_time + self . EstimateTimeRemaining ( ) ) log_message = ( '{0:s} hash analysis plugin running. {1:d} hashes in queue, ' 'estimated completion time {2:s}.' . format ( self . NAME , self . hash_queue . qsize ( ) , completion_time ) ) logger . info ( log_message ) self . _time_of_last_status_log = current_time
Prints a progress update if enough time has passed.