private string FormatTime(int time) { int hour = 0, min = 0, sec = 0; hour = time/60/60; min = (time%(60*60))/60; sec = (time%(60*60))%60%60; return string.Format("{0:00}:{1:00}:{2:00}", hour, min, sec); }