Android: Time Loop in milliseconds -


this game similar 1 of try survive long possible, hell-shooter games.

so wish record amount of time user can survive after pressing "start". similarly, continue update frames @ time. thinking using handler or timer or animation updating frames (the activity) , mathematically manipulating simpledateformat. however, i'm not sure how 1 go it.

as start, have of fruitninja survival mode, though smaller times recorded too.

thanks!

you can use timer or thread handler

   timer = new timer();         timer.schedule(new timertask() {             @override             public void run() {                 own code                 ///////schedule timer, after first 100ms timertask run every 1000ms             }         }, 1000, 1000); 

can use handler

  handler handler = new handler();         handler.postdelayed(             new runnable() {                 public void run() {                     afficher();                 }             }, 1000l); 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -