Simple Timer Example but it wont work fine
<p>I made a simple timer example but it work as it have to be.
Here is the code</p>

<pre><code>public class TimerExample extends Activity {
private Timer timer;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    timer=new Timer();
    timer.schedule(new TimerTask(){

        @Override
        public void run() {
            // TODO Auto-generated method stub
            TimerMethod();

        }

    }, 0, 10000);

}

public void TimerMethod()
{
    Toast.makeText(getApplicationContext(), "Hi this is piyush", Toast.LENGTH_LONG).show();
}
}
</code></pre>

<p>a toast have to be appeared after 10 sec but it wont happen. please suggest the correct way.</p>
