Android SDK (Eclipse) : How to create a simple timer for a simple App? <p>i have a simple Application about writing the sentence which is shown when the application starts.The only Problem is, i need the application to calculate the time it took the user to write the sentence .. like when you touch "Submit" Button , the Toast message will say " Thats Right ! , It took you 3.2 Second" As Example .</p> <p>I heard you can set a timer to start on when specific action occurs ... and you can order it to stop .</p> <p><strong>So let's say The Timer will start when you start the app and it will stop when you touch "Submit" button , and give a toast message like above calculating the exact time it took you to write the sentience after starting the App ! *</strong></p> <p><strong>Here is the App Code hope it helps : *</strong></p> <pre><code>Button w; TextView t; EditText e; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); w = (Button) findViewById(R.id.Write); t= (TextView) findViewById(R.id.FTS); e = (EditText) findViewById(R.id.Text); w.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String check1 = t.getText().toString(); String check2 = e.getText().toString(); if (check1.equals(check2)) Toast.makeText(MainActivity.this,"You Wrote it Right !!!",Toast.LENGTH_LONG).show(); else if (check2.equals("")) Toast.makeText(MainActivity.this,"It's Empty",Toast.LENGTH_LONG).show(); else Toast.makeText(MainActivity.this,"You wrote it wrong,try again !",Toast.LENGTH_LONG); </code></pre> <p><strong>I'm Totally new to Android so I really don't know how to do it , Thanks for your Time .*</strong></p>