java - How to execute a block of code with 1 second intervals? -


i need execute block every 1 second, needs in same thread. means, understand, can't make use of timer class.

is there way want?

create thread , write loop -

while(true) {     //     thread.sleep(1000); } 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

ruby - Nesting modules inside of a Rails eninge gem -

Eclipse formatter for java ending braces -