code: func (s *Service) reportLatency(conn *websocket.Conn) error {
  	// Send the current time to the ethstats server
  	start := time.Now()
  
  	ping := map[string][]interface{}{
  		"emit": {"node-ping", map[string]string{
  			"id":         s.node,
  			"clientTime": start.String(),
  		}},
  	}
  	if err := websocket.JSON.Send(conn, ping); err != nil {
  		return err
  	}
  	// Wait for the pong request to arrive back
  	select {
  	case <-s.pongCh:
  		// Pong delivered, report the latency
  	case <-time.After(5 * time.Second):
  		// Ping timeout, abort
  		return errors.New("ping timed out")
  	}
  	latency := strconv.Itoa(int((time.Since(start) / time.Duration(2)).Nanoseconds() / 1000000))
  
  	// Send back the measured latency
  	log.Trace("Sending measured latency to ethstats", "latency", latency)
  
  	stats := map[string][]interface{}{
  		"emit": {"latency", map[string]string{
  			"id":      s.node,
  			"latency": latency,
  		}},
  	}
  	return websocket.JSON.Send(conn, stats)
  }
docs: // reportLatency sends a ping request to the server, measures the RTT time and
  // finally sends a latency update.