How to manipulate time in unity?

hi, i’m trying to build time in my game which is 30 seconds inside my game equal to a second in real time.
i’ve try to use the timer script and multiply it with 30 but the timer gone wrong at the 2nd minute…

here’s the code which is count for real time :

private var startTime;
var textTime : String; 
var myFont : Font;



function Awake() {
   startTime = Time.time;

}

function OnGUI () {
	var guiTime = ((Time.time - startTime));  //i've try multiply this time with 30

  var hours : int = (guiTime / 14400) % 23;
   var minutes : int = (guiTime / 120) % 59;
   var seconds : int = guiTime % 60;
 

   textTime = String.Format ("{0:00}:{1:00}:{2:00}",hours, minutes, seconds); 
   GUI.skin.font = myFont;
   GUI.Label(Rect(600, 15, 100, 30), "Time : ");
   GUI.Label (Rect (600, 40, 100, 30), textTime); 
   
}

i hope someone can help.
thanks!

*sorry for my bad english…:stuck_out_tongue:

Your values are wrong. The 120 should be 60. The 14400 should be 3600.

You should also make guiTime an int.