int count = 0; while(IsOperatorControl()) { readInput(); //However you get the data count++; if(count >= 10) { count = 0; printData(); } ... }