delay function (java)
Posted: Mon Oct 13, 2003 12:17 pm
hi
i m trying to put a delay function in my program which is supposed to be a very straight forward thing but its not working wat i m doing is that
and i think this should work but wats happening is that rather having this 1 sec delay everytime the loop runs .. wat it does is that it stops for 1 sec and then print out the whole loop
can someone help me with this
i m trying to put a delay function in my program which is supposed to be a very straight forward thing but its not working wat i m doing is that
Code: Select all
while(i++ < something){
Thread.sleep(100);
//do something now
}
can someone help me with this