NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.7

There's no provision in NewPing to track when a ping is in process. Once a ping is complete, you know if there was no ping or a ping and at what distance. It's designed to be like an interrupt, where once the ping is complete your code then processes the result. There's no requirement for the pingResult() function. That's just there as a sample because most people want to process results as soon as a ping has been completed. If you don't need it, simply delete it.

What you want to accomplish can be done without any modification to the library. As your task is specific and different than most, it's best to have this code be in your sketch instead of the library. This actually allows for more flexibility. The process of pinging every 50 milliseconds can easily be done with the 15 sensor sketch example. It doesn't matter if it's in your sketch or inside the NewPing library, it would be just as involved. Having this inside your sketch allows for exact control as well.

ping_forever() would be a function in your sketch, basically like the 15 sensor sketch. I've already done the work for you, you just need to impliment it in your sketch. Having the library do too much would be outside the scope of the library. It's designed to ping the sensor, not really manage all aspects of when a ping is sent or for how long. The 15 sensor sketch is your ping_forever() function. Just use that and add the rest of your code. Also, be sure to read my post on more details about the 15 sensor sketch, and ways to tweak it for your needs. I believe you'll find that I've already answered your questions there.

Here's a sample sketch that I whipped up for you that may assist:

#include <NewPing.h>

#define SONAR_NUM      3
#define MAX_DISTANCE 200
#define PING_INTERVAL 33

unsigned long pingTimer[SONAR_NUM];
unsigned int cm[SONAR_NUM];
uint8_t currentSensor = 0;
uint8_t pingStatus = 0;

NewPing sonar[SONAR_NUM] = {
  NewPing(4, 5, MAX_DISTANCE),
  NewPing(6, 7, MAX_DISTANCE),
  NewPing(8, 9, MAX_DISTANCE)
};

void setup() {
  Serial.begin(115200);
  pingForever();
}

void loop() {
  for (uint8_t i = 0; i < SONAR_NUM; i++) { // Loop through all the sensors.
    if (millis() >= pingTimer[i]) {
      pingTimer[i] += PING_INTERVAL * SONAR_NUM;
      sonar[currentSensor].timer_stop();
      currentSensor = i;
      cm[currentSensor] = 0;
      pingStatus = 1;
      sonar[currentSensor].ping_timer(echoCheck);
    }
  }
  
  /*
  At any time, you can get the value of pingStatus, currentSensor,
  or read the values of the last pings in the cm[] array.  It's
  up to you to figure out what you want to do with this data.
  */
}

void pingForever() {
  pingTimer[0] = millis();
  for (uint8_t i = 1; i < SONAR_NUM; i++) pingTimer[i] = pingTimer[i - 1] + PING_INTERVAL;
}

void pingStop() {
  for (uint8_t i = 0; i < SONAR_NUM; i++) pingTimer[i] = -1;
  pingStatus = 0;
}

void echoCheck() {
  if (sonar[currentSensor].check_timer()) {
    cm[currentSensor] = sonar[currentSensor].ping_result / US_ROUNDTRIP_CM;
    pingStatus = 0;
  }
}

Beyond this, and the 15 sensor sketch help post, you'll need to post your sketch for me to offer suggestions.

Tim