Scripting a Timer

Can someone post some code (preferably JS) that will let me run a timer?

Something that will write a message to the debug log every 5 seconds would be great.

function Start () {
	InvokeRepeating("Timer", 5, 5);
}

function Timer () {
	Debug.Log ("Hi!");
}

–Eric