code: public long stop(long time) {
  		m_nesting--;
  		// not started and stopped
  		if (m_nesting < 0){
  			m_nesting = 0;
  		}
  		if (m_nesting == 0){
  			long elapsedTime = time - m_startTime;
  			m_elapsedTime += elapsedTime;
  			return elapsedTime;
  		}
  		return 0;
  	}
docs: Stop the timer. If timer was started, update the elapsed time.