Code example for TimeUnit

Methods: toHours, toMinutes

0
	} 
	 
	private void updateTimerDisplay(long duration) {
		if (mClock != null) {
			mClock.setText(String.format("%02d:%02d",
					TimeUnit.MILLISECONDS.toHours(duration),
					TimeUnit.MILLISECONDS.toMinutes(duration)));
		} 
	} 
	 
	@Override 
	public void onStart() { 
		super.onStart(); 
		 
		IntentFilter filter = new IntentFilter(Intent.ACTION_TIME_TICK);
		getActivity().registerReceiver(mTimeTickReceiver, filter);
		 
		updateTimerDisplay(System.currentTimeMillis() - mStartTime);
	} 
	 
	@Override