lundi 28 avril 2014

How to make each in for loop execute in interval?


Vote count:

0




I have a global variable and a ArrayList



boolean resultOk;
....
ArrayList<byte[]> payloadList;
...

a for loop:

for(int i=0; i<payloadList.size(); i++){
...
}


I would like each one in for loop, it will do in 5s (timeout). If in 5s, "resultOk" is true, it will move to next in for loop. If the time is up, it will break for loop. How to do? Thank you!



asked 41 secs ago






Aucun commentaire:

Enregistrer un commentaire