How to script a seconds hand of a clock

Hello All

How to script a seconds hand of a clock, the seconds hand of a clock should rotate and stop for a second and rotate again and stop for a second and so on.
I tried doing it but it gives me continuous rotation and i dont want that.
Thanks in advance.

One way is to use a curve. X^5 will work:

#pragma strict

private var timer = 0.0;

function Update () {
  
   timer += Time.deltaTime;
   timer = timer % 60.0;
   
   var fractionTime = timer % 1.0;
   var baseTime = timer - fractionTime;
   var angle = baseTime * 6.0 + Mathf.Pow(fractionTime, 5.0);

   transform.eulerAngles = Vector3 (0.0, 0.0, -angle);
}

If you want even more control, you can use an AnimationCurve rather than Mathf.Pow(). For example, you might want the second hand to overshoot the second position and snap back each time it ticks. This could easily be done by substituting an animation curve.