invoke much faster than update timer?

Hi,

I’ve just upgraded my code from using timers to invokes.

Whereas before i had something like this in update:

cooldown = 0 initially

    if(cooldown >= 0){
       cooldown -= Time.deltaTime;
    }
    else{
       dostuff()
       cooldown = cooldowntime;
   }

now i have this:
initially i call Dostuff()

function DoStuff(){
   stuff happens;
   if(stuff not finished){
     invoke("DoStuff",cooldowntime);
   }
}

The invoke code runs WAYYYY faster than the timer even though cooldowntime is exactly the same. Im not sure what i messed up?
Is invoke frame rate independent or something compared to update timer maybe?

Hi @luniac:

Maybe you found the answer before but in case you didn’t, it’s better StartCoroutine. In the linke What is the best between StartCoroutine or InvokeRepeating. - Unity Answers you can find how the expert answered it.

cheers,