title: How to make a simple timer without new class in Android?
body: <p>I'm developing a Service for Android, that must run in background, executing a function each 100 seconds. That's the source code (example)</p>
  
  <pre><code>package com.example
  
  import ....
  
  public class Servizio extends Service {
  
      public IBinder onBind(Intent intent) {
  
      }
  
      public void onCreate() {
  
      }
  
      public void onDestroy() {
  
      //here put the code that stop the timer cycle
  
      }
  
      public void onStart(Intent intent, int startid) {
  
      //i want to begin here the timercycle that each 100 s call myCycle()
  
      }
  
      public void myCycle() {
  
      //code that i can't move on other class!!!
  
      }
  
  }
  </code></pre>
  
  <p>How I can do that? Now the service execute myCycle() just one time, beacause I put a calling in onStart().</p>