While loop timer going straight to -time increment

So basically I have a cooldown timer which is set at the start of the function along with a boolean saying that it is active (thus preventing it from executing again if it is active). Then it executes the code and gets to the end.

while(skillsActive[1])
	{
		skillsCooldown[1]=skillsCooldown[1]-(1*Time.deltaTime);
		if(skillsCooldown[1]<=0)
		{
			//skillsCooldown[1]=0.0;
			skillsActive[1]=false;
		}
	}

This immediately sets the skillsCooldown[1] to 1 frame of time passing as thought it was initially at a value of 0 even though for the fun of things I ramped it up to 9001. Been coding for a few hours, maybe another set of eyes can see whats going on?

Is this in Update? Change the while to an IF. Is it a coroutine? If so, missing a yield return null in the loop (or the javascript version.)

Right now, the loop, in a single frame, will just spin and subtract over and over. It’s like how while(i<1000) i+=1; is a fancy way to say if(i<1000) i=1000;

If the code is in update, update already runs in a loop, every frame, so no reason to add another loop.