optimize procedure wait/sleep from while(...){..} to do{...}while(...);
optimize procedure wait/sleep from while(...){..} to do{...}while(...);

ximenpo/simple-cpp,ximenpo/simple-cpp,ximenpo/simple-cpp,ximenpo/simple-cpp,ximenpo/simple-cpp,ximenpo/simple-cpp