Coroutine Timing Off on iPhone

I use a coroutine to decrement a timer in my game. The timing is perfect when the game plays on the computer, but on the iPhone my timing is off. Here is my code:

//Decrements the timer by milliseconds
	IEnumerator EnemyAttackTimer(float waitTime)
	{
		for (float i = 0; i < TimeBetweenAttacks;i+=.1f)
		{
			yield return new WaitForSeconds(waitTime);
			attackTimerCountDown -= .10f;
					
			//Adjust timer according to time between attacks
			float temp = attackTimerCountDown / TimeBetweenAttacks * 1;
			temp = 1-temp;
			TimerObject.renderer.material.SetFloat("_Cutoff",temp);
		}
	}

The coroutine is called every .1 seconds and it decrements my variable attackTimerCountDown by .10 each time the coroutine starts. When the variable reaches 0, the attackTimerCountDown resets to TimeBetweenAttacks.

So if TimeBetweenAttacks was 10 seconds, my health bar would decrement every single millisecond. Again, this works great on the computer, but on the iphone it moves slower.

Help porfavor.

At first glance I think this might be caused by the lower framerate on the iPhone.

You could try to decrease the countdown variable by the actual time spent since the last execution of the coroutine, as well as in your loop. (print it to convince yourself) If I had to do something similar, I would simply put the code in an update function and make sure to use delta time, which would ensure the health bar always moves at the same speed regardless of the current framerate and that it moves every time it is rendered to avoid choppy movement.