Playing clock ticking sound

Hello,

I am trying to play a clock ticking sound every second until the round timer = 0. I am not sure how to write the code.

Here what I have sofar.if (roundTimer > 1) { audio.PlayOneShot(timerTickAudio, 0.30f); Debug.Log("Play timer tick"); }

I know I need to use time.detatime somewhere.

Thanks for the help.

John

C#

float timer = 1f;
public float roundTimer = 60f;

void Update() {
   timer -= Time.Deltatime;
   if(timer <= 0 && roundTimer > 0) {
      audio.PlayOneShot(timerTickAudio, 0.30f);
      timer = 1f;
      roundTimer -= 1f;
   }
}