Code example for Chronometer

Methods: setText, setBase, start

0
 
    //from above 
    private void startChronometer(){ 
    	String currentTime = "";
		Toast.makeText(getApplicationContext(), "Made it into Start", Toast.LENGTH_SHORT).show();
		mChronometer.setBase(SystemClock.elapsedRealtime());
		mChronometer.start();
		btnStart.setText("Pause");
		mChronometer.setText(currentTime);
    } 
 
 
 
    @Override 
    public boolean onCreateOptionsMenu(Menu menu) {
    	super.onCreateOptionsMenu(menu);
    	CreateMenu(menu);
    	return true; 
    } 
 
    @Override