I need the equivalent code of setTimeOut(call function(),milliseconds);
for android.
setTimeOut(call function(),milliseconds);
There is setTimeout() method in underscore-java library. I am the maintainer of the project.
Code example:
import com.github.underscore.lodash.U;
import com.github.underscore.Function;
public class Main {
public static void main(String[] args) {
final Integer[] counter = new Integer[] {0};
Function incr = new Function() { public Void apply() {
counter[0]++; return null; } };
U.setTimeout(incr, 100);
}
}
The function will be started in 100ms with a new thread.