March 4, 201510 yr The way a conditional sleep functions is amongst these lines : public boolean conditionalSleep(Condition c, long timeout) { Timer t = new Timer(timeout); while ((t.isRunning()) && (!c.validate())) { sleep(20); } c.validate(); return c.validate(); } Condition being following interface: public interface Condition { public boolean validate(); } Excuse the shit indentation :p Edited March 4, 201510 yr by Articron
March 5, 201510 yr The way a conditional sleep functions is amongst these lines : public boolean conditionalSleep(Condition c, long timeout) { Timer t = new Timer(timeout); while ((t.isRunning()) && (!c.validate())) { sleep(20); } c.validate(); return c.validate(); } Condition being following interface: public interface Condition { public boolean validate(); } Excuse the shit indentation nice to see you back
March 5, 201510 yr The world needs more people like you James, people that aren't afraid to express their opinions, and certainly don't treat everything like they are competing for the world title.
Create an account or sign in to comment