code: func (m *CPUMiner) HashesPerSecond() float64 {
  	m.Lock()
  	defer m.Unlock()
  
  	// Nothing to do if the miner is not currently running.
  	if !m.started {
  		return 0
  	}
  
  	return <-m.queryHashesPerSec
  }
docs: // HashesPerSecond returns the number of hashes per second the mining process
  // is performing.  0 is returned if the miner is not currently running.
  //
  // This function is safe for concurrent access.