code: def add(self, index):
          
          if (index - self.flush_at) < self.interval:
              return
          now = time.time()
          elapsed = now - self.lap
          elapsed_total = now - self.start
          it = index - self.flush_at
          self.lap = now
          if self.verbose:
              logger.info("iter={} {{{}}}={}[sec/{}iter] {}[sec]".format(
                  index, self.name, elapsed, it, elapsed_total))
          if self.fd is not None:
              print("{} {} {} {}".format(index, elapsed,
                                         it, elapsed_total), file=self.fd)
          self.flush_at = index
docs: Calculate time elapsed from the point previously called
          this method or this object is created to this is called.
  
          Args:
              index (int): Index to be displayed, and be used to take intervals.