title: How to allow a case to run N times
body: <p>I'm running some C++ code on an SDK that uses a switch statement for whenever particular events occur. I am working on the case that occurs when the signal strength of a bluetooth signal changes and it will report the new value back. I only want this to report back N times instead of continuously however, how could I achieve this?</p>
  
  <pre><code>case BLE_GAP_EVT_RSSI_CHANGED:
      sd_ble_gap_rssi_get(p_ble_evt-&gt;evt.gap_evt.conn_handle, &amp;RSSI);
      printf("\nRSSI =%d dBm", RSSI);
      break;
  </code></pre>