Delaying an update

Is there any way to delay an update after something happens?
I want to make changes to an InvokeRepeating timer but the value changes too fast due to the fast updates

void Update() {
	if (Mathf.Approximately (Mathf.Floor (Time.time / 5), Mathf.Floor (Time.time % 5)) && NewRespawnTime > 0.5f) {
		NewRespawnTime -= 0.5f;
	} else if (NewRespawnTime == 0.5f) {
		NewRespawnTime = 0.5f;
	}
}

NewRespawnTime is the value that changes too fast

void Start() {
		InvokeRepeating ("ChooseBlock", 2, NewRespawnTime);
}

There are a couple ways you can do this that I can think of, both involving Coroutines. The first is the simplest and probably what you should use if you only need to do it once and in only one class. Basically you just wrap your update in a boolean and then set it when your timer starts and finishes like this:

private bool canUpdate = true;

void Update()
{
    if (canUpdate)
    {
        //Do Update stuff
        //If some condition requires a pause in Update:
        if (pauseUpdate)
        {
            canUpdate = false;
            StartCoroutine("DelayUpdate", 2f);
        }
    }
}

private IEnumerator DelayUpdate(float time)
{
    yield return new WaitForSeconds(time);
    canUpdate = true;
}

The other way is a bit more involved but much more scale-able and I would recommend it if you have a lot of circumstances where you’re doing this or a lot of conditions where you are removing Updates from your classes. Essentially you bypass the default Unity Update class and create a helper class that centralizes all of your updates into one list of delegates that gets looped through in a single Unity Update. This lets you add and remove your custom update functions from the list at will without having to worry about managing a bunch of booleans or taking the (very minor) overhead of checking them every frame. It’s relatively simple to implement and would look something like this:

public class CoreUpdate : MonoBehaviour {

    private static List<Action> updateFunctions = new List<Action>();

    void Update()
    {
        foreach(Action update in updateFunctions)
            update();
    }

    public static void AddUpdate(Action updateFunction)
    {
        updateFunctions.Add(updateFunction);
    }

    public static void RemoveUpdate(Action updateFunction)
    {
        updateFunctions.Remove(updateFunction);
    }
}

Then rather than assigning booleans like in the above example you would use CoreUpdate.AddUpdate(CustomUpdate); to add and start up your CustomUpdate function and CoreUpdate.RemoveUpdate(CustomUpdate); to remove it from the list and stop it from running.