java - Run method for all values in Array at once -
i trying run multiple methods of same method @ same time. right doing 1 @ time , sleeping once loops through of them. need values in array @ same time via method. here current code:
public static void checktimer(ts3api api) { (string keys : admins) { //what need: check groups values in string @ same time checkgroup(api, keys); } try { //sleep 10 second thread.sleep(10000); } catch (interruptedexception e) { // nothing } }
thread.sleep(10000) causes current thread sleep 10 seconds. primary thread. have not split off threads primary one, working wrote it.
take through java documentation http://docs.oracle.com/javase/7/docs/api/java/lang/thread.html
there examples of splitting off threads. should on way solution.
Comments
Post a Comment