code: func startStop(net *Network, quit chan struct{}, nodeCount int) {
  	nodes, err := connectNodesInRing(net, nodeCount)
  	if err != nil {
  		panic("Could not startup node network for mocker")
  	}
  	tick := time.NewTicker(10 * time.Second)
  	defer tick.Stop()
  	for {
  		select {
  		case <-quit:
  			log.Info("Terminating simulation loop")
  			return
  		case <-tick.C:
  			id := nodes[rand.Intn(len(nodes))]
  			log.Info("stopping node", "id", id)
  			if err := net.Stop(id); err != nil {
  				log.Error("error stopping node", "id", id, "err", err)
  				return
  			}
  
  			select {
  			case <-quit:
  				log.Info("Terminating simulation loop")
  				return
  			case <-time.After(3 * time.Second):
  			}
  
  			log.Debug("starting node", "id", id)
  			if err := net.Start(id); err != nil {
  				log.Error("error starting node", "id", id, "err", err)
  				return
  			}
  		}
  	}
  }
docs: //The startStop mockerFn stops and starts nodes in a defined period (ticker)