Make code execute for a specified time?

Once i click a cube in my game i wish for the timescale to be half, therefore halfing the games time, the problem is how do i do this for say 5 seconds? Is there any way of possibly keeping it in the slowed state for 5 seconds?

Im new to unity so thanks!

http://docs.unity3d.com/Documentation/ScriptReference/index.Coroutines_26_Yield.html

Check out coroutines. You can use ‘WaitForSeconds()’ to do this fairly easily.