c# count down timer

Hi, I want to make a script who will count down the time (for example 5 sec.) and then it will add cash and that will be made only when I click on the button and only once for click.

public Click click;
public ItemManager item;
public float Profit;
void Start()
{
        StartCoroutine(GetCash());
}
void Update()
{
    Profit = item.tickValue * item.count;
}

public void Getcashperwait()
{
    click.cash += Profit;
}
IEnumerator GetCash()
{
    while (true)
    {
        Getcashperwait();
        yield return new WaitForSeconds(item.wait);
    }
}

you can try this:

void Start(){
timeLeft = totalTime;
}
void Update () {
		if (!timeCompleted) {
			timeLeft-=Time.deltaTime;
			timeString=GetTimeInString(timeLeft);
			String []timeInsceconds=timeString.Split(':');

			quimanager.timerText.text = timeInsceconds[2];
			if(timeLeft<=0){
				timeCompleted=true;

				timeLeft=timeToGiveAnswer;
		
				TimeUp();
			}
		}
	}

this code is when you wanted to add delay with invoke.

public int mCash = 100;
public int mProfit = 500;

public void AddCash(){
           Invoke("YourMethod",5f);
}

//YourMethod in Invoke must be without parameter.
private void YourMethod(){
       mCash += mProfit;
}

this code is when you wanted to add delay with Couroutine.

public void ClickAddCash(){
      StartCouroutine(AddCash, 5f);
}

IEnumerator AddCash(){
    yield return new WaitForSeconds(5);
    mCash += mProfit;
}