NGUI UI Slider: Progress Bar

Hello, I’m trying to use NGUI’s UI Slider to make a progress bar for a game that decreases as time passes when harvesting minerals and resources. The problem is that the bars don’t have a fixed maximum size to decrease from. I wanted all of the progress bars to be uniform despite having different times, but they all instead become longer the more time there is. How do I fix this?

The Bar Code:
public class Harvest_Bar : MonoBehaviour {

	private UISlider _slider;
	private float _maxWidth;
	private float _balancer;

	void Awake ()
	{
		_slider = GetComponent<UISlider>();
		_maxWidth = _slider.foreground.localScale.x;

	}
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	public void updateDisplay(float totalTime)
	{
		_slider.foreground.localScale = new Vector3(totalTime * 2.56f, _slider.foreground.localScale.y, _slider.foreground.localScale.z);

	}
}

Code calling it:

void Update()
	{
		//Timer
		//guiText.text = "Time Left: " + Mathf.Floor(activeTime);
		if(isHarvesting || isReplinishing)
		{
			activeTime -= Time.deltaTime;
			pb.GetComponent<Harvest_Bar>().updateDisplay(activeTime);
		}

		if(activeTime <= 0)
		{
			if(isHarvesting)
			{
				harvestComplete();
			}
			else if (isReplinishing)
			{
				replinishComplete();
			}

		}
			
	}

You can use a maxTime variable initialised to the maximum amount of time and then use it in the Time.deltaTime like this:

activeTime -= Time.deltaTime / maxTime;

This way, if you initialise activeTime to 1.0f, your activeTime will decrease from 1 to 0 in maxTime seconds (and you can use that as the value of your UISlider).