What is the difference between AsyncTask & Timers

I was wondering if both AsyncTask and Timer Tasks are essentially doing the same thing (creating asynchronous commands) what is the advantage of using one over the other?

AsyncTask can be run on other different thread (or else you call StartSynchronousTask() on main thread)

Timer runs on main thread, on every frame timers are checked if time passed it will execute the binded function, so it only creates illusion of asynchronous behavior, kind of like in JavaScript (JSNote more specifically).

1 Like