Time display

I have script a clock counter now. but I want to display as 00:00:00
how can I do that?

below is my script:

var min : int;
var sec : int;
var fraction : int;
var timecount : float;
var starttime : float;
var timeCounter : GUIText;

function Start ()
{
starttime = Time.time;
}

function Update () {
timecount = Time.time - starttime;
min = (timecount/60f);
sec = (timecount % 60f);
fraction = ((timecount * 10) %10);
timeCounter.text = String.Format("{0}:{1}:{2}",min,sec,fraction);
}

All you have to do is to specify the format of each parameter:

String.Format("{0:00}:{1:00}:{2:00}",min,sec,fraction);

That should do what you want.

To get it to display correctly, you should change the line

min = (timecount/60f);

to

min = Mathf.Floor((timecount/60f));

Otherwise, the clock will read 1 minute 30 seconds after just 30 seconds have passed.