var totalTime = 0.0;

private var textMeshComponent;
private var timerOn = true;

// store the text component so that GetComponent isn't called every frame
function Start() {
	textMeshComponent = GetComponent("TextMesh");
}

// update is called every frame
function Update() {
  if (timerOn) {
	// add amount of time since last frame to the totalTime
	totalTime += Time.deltaTime; 
  
	// use substring to get a shorter numerical value
	textMeshComponent.text = totalTime.ToString().Substring(0,4);
  }
  

}
