multithreading - Android java.util.concurrent.Executors newSingleThreadScheduledExecutor example -


i having problem android java.util.concurrent.executors.

i trying use newsinglethreadscheduledexecutor run runnable every x seconds. saw executor.scheduleatfixedrate(mytask, 0, 50, timeunit.milliseconds); doesn't exists in android.

the android documentation link , not give clue how should use newsinglethreadscheduledexecutor;

could give me example how should use run runnable every x seconds? know can use handler, wondering how can use singlethreadscheduledexecutor same.

thanks in advance.

you can example here: http://www.java2s.com/code/javaapi/java.util.concurrent/executorsnewsinglethreadscheduledexecutor.htm

actually executors comes java 7 .


Comments

Popular posts from this blog

mysql - java.sql.SQLException Parameter index out of range (1 > number of parameters, which is 0) -

c - ALSA programming: how to stop immediately -