title: how to add video timer in android
body: <p>i am new in android. i am developing an application where i record a video and see the time of its recording.i cant add the timer part.can anyone help me out..
  my camera recording part i s as follows---</p>
  
  <pre><code> myButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              if(recording){
                  // stop recording and release camera
                  mediaRecorder.stop();  // stop the recording
                  releaseMediaRecorder(); // release the MediaRecorder object
  
                  //Exit after saved
                  finish();
              }else{
  
                  //Release Camera before MediaRecorder start
                  releaseCamera();
  
                  if(!prepareMediaRecorder()){
                      Toast.makeText(MainActivity.this, 
                              "Fail in prepareMediaRecorder()!\n - Ended -", 
                              Toast.LENGTH_LONG).show();
                      finish();
                  }
  
                  mediaRecorder.start();
                  recording = true;
                  myButton.setText("STOP");
              }
          }
      });
  </code></pre>