Serial.parseInt() takes longer time than desired My whole code for master. Please head to void read() where I've used parseInt()     

#include &lt;nRF24L01.h&gt;
#include &lt;printf.h&gt;
#include &lt;RF24.h&gt;
#include &lt;RF24_config.h&gt;
#include &lt;SPI.h&gt;

RF24 radio(7, 8); //Set up nRF24L01 on CE pin and CSN pin respectively

const uint64_t pipe = 0x0ABCDEF; //Address for communication between master and slave
uint16_t data[7];
const uint16_t buffer_size = sizeof(data); //Size of the payload for the RF
int i, flag;
int tx_counter = 0;


void read();
void setup() {

  Serial.begin(115200);

  radio.begin();
  radio.setChannel(2);
  radio.setDataRate(RF24_1MBPS);
  radio.setPALevel(RF24_PA_MIN);
  //radio.powerUp();
  radio.openWritingPipe(pipe);
  //radio.setPayloadSize(7);
  radio.stopListening();


  //Default values range from 100 to 700
  for (i = 0; i &lt; 7; i++) {
    data[i] = 100 + (100 * i);
  }
  flag = 0;
  Serial.println("Enter 7 values");
}

void loop() {

  read();

  if (flag) {
    bool tx_ok = radio.write(data, buffer_size);
    tx_counter++;
    Serial.print("Transmission count:\t");
    Serial.println(tx_counter);
    print();
    if (tx_ok) {
      Serial.println("Transmitted Successfully");
      Serial.println("\nEnter Next set of 7 numbers");
    }
    else Serial.println("Transmission failed");

  }
}

void print() {
  for (i = 0; i &lt; 7; i++) {
    Serial.println(data[i]);
  }
  flag = 0;
}

void read() {
  while (Serial.available()) {
    for (i = 0; i &lt; 7; i++) {
      data[i] = Serial.parseInt();      
    }
    flag = 1;
  }
}


My problem is that Serial.parseInt() takes some time. The code prints out the values to the serial monitor after sometime. I have timed it and it appears to be around 7 seconds. The arduino page on the function says default timeout is 1 sec. So I think 7 elements in the array takes 1 sec each. If I use Serial.setTimeout(2000), the same thing takes 14 seconds. 

This has got to have a simpler way. I want it to behave like when we use Serial.read. Please help me on this.
this is what you want:

void read() {
  for (i = 0; i &lt; 7; i++) {
    while (!Serial.available()); // wait forever for some input
    data[i] = Serial.parseInt();      
  }
  flag = 1;
}