code: func (bi *blockImporter) logProgress() {
  	bi.receivedLogBlocks++
  
  	now := time.Now()
  	duration := now.Sub(bi.lastLogTime)
  	if duration < time.Second*time.Duration(cfg.Progress) {
  		return
  	}
  
  	// Truncate the duration to 10s of milliseconds.
  	durationMillis := int64(duration / time.Millisecond)
  	tDuration := 10 * time.Millisecond * time.Duration(durationMillis/10)
  
  	// Log information about new block height.
  	blockStr := "blocks"
  	if bi.receivedLogBlocks == 1 {
  		blockStr = "block"
  	}
  	txStr := "transactions"
  	if bi.receivedLogTx == 1 {
  		txStr = "transaction"
  	}
  	log.Infof("Processed %d %s in the last %s (%d %s, height %d, %s)",
  		bi.receivedLogBlocks, blockStr, tDuration, bi.receivedLogTx,
  		txStr, bi.lastHeight, bi.lastBlockTime)
  
  	bi.receivedLogBlocks = 0
  	bi.receivedLogTx = 0
  	bi.lastLogTime = now
  }
docs: // logProgress logs block progress as an information message.  In order to
  // prevent spam, it limits logging to one message every cfg.Progress seconds
  // with duration and totals included.