Decreasing values over seconds

How to make specific variable decrease by 1 in exactly 1 second? I mean exactly 1 per exatly 1 second, so using Time.DeltaTime is not accurate method. Is yield WaitForSeconds method more accurate than this?

I don’t really understand why time.deltaTime wouldn’t be accurate enough but maybe your using it wrong. Try this. I’ve attached the output so you can decide for yourself if its accurate enough for you.

public float timeLeft = 1.0f;
timeLeft -= Time.deltaTime;  
 if (timeLeft <= 0) 
  {
     //do something
     timeLeft = 1.0f;
  }

Coroutines might be your answer. Instead of updating every frame, they can be calculated over a couple frames and even given time delays before running again. I just learned about them myself and am not great with their implementation yet, but I think logically they will help you with your issue. Try digging through this and see if you can get anything from it: Unity - Manual: Coroutines

hope that helps. If I get time later today I may look into how that code would look.
edit: Okay, I just fixed a ton of errors. This seems to work, but is probably over complicated and whether it is more accurate is still up for question. Also this is in C#.

    //the variable you are decreasing
    public float myVariable = 10f;
	//I didn't know how to trigger the coRoutine only once, so I used a switch
	public bool begin = true;
	

	void Update () {
		//coroutines aren't exclusive, so this makes sure it is only run one time
		if (begin == true) {
				//calls the coroutine
				StartCoroutine ("Decrease");
			begin = false;		
		}
	}

	//coroutine decleration
	IEnumerator Decrease (){

			while (myVariable > 0)
		       {
			myVariable -= 1;
			yield return new WaitForSeconds(1);
		       }
	   }
	 }

so I’m sure this is overly complicated but I got it to work, maybe it helps. But there are definitely simpler ways to do it. Honestly just learned about coroutines and wanted to implement something with the,

For a countdown timer(in js) do this :

//Change to whatever start value you want.
private var iTime_Left : int = 45;


//Start Countdown here, place this in your
//script where you need it.

//The first digit says when first to trigger,
//you don't want to take a second immediatley
//so 1.

//The second digit says haw often to run
//this function
if (!IsInvoking("subTake_Second")) {
    InvokeRepeating("subTake_Second", 1, 1);
}


//Your countdown function.
function subTake_Second() {

    if (iTime_Left > 0) {
        iTime_Left = iTime_Left - 1;
    }
}