I would like to call a function ABC()every 10 seconds, again and again, until I use the return statement to exit. But I do not want to use any Java function Time.
ABC()
Time
Can anyone advise me how to do this?
Use CountDownTimer
CountDownTimer t = new CountDownTimer( Long.MAX_VALUE , 10000) { // This is called every interval. (Every 10 seconds in this example) public void onTick(long millisUntilFinished) { Log.d("test","Timer tick"); } public void onFinish() { Log.d("test","Timer last tick"); start(); } }.start();
Source: https://habr.com/ru/post/1754205/More articles:Multiple bank accounts for different applications in iTunes connect - iphoneWriting a contact in the contact database - Android 2.1 - javaHow to write data to plist - stringRuby - Internationalized Domain Names - ruby | fooobar.comWhere to find Observable in VS2010? - visual-studio-2010https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1754206/what-are-alternatives-to-the-getshortpathname-function&usg=ALkJrhhfPHMegFJsYO31pTH0yGLCNCfVvgF # Handling exceptions for part of a function - exceptionhow to check multiple input type files using jquery validation module - javascriptInsert multiple rows into a table using Entity Framework - c #Using the same .proto file for a C # and C ++ project - c ++All Articles