Download

Timers called with zero seconds

Is there any reason this removes the timer instead of putting it on the stack to be called immediately? I remember in UE3 it worked that way. Perhaps it’s a minor thing, but I always find it annoying when I loop through things with a timer, and use (i * SomeVariable), only to forget that the first timer won’t go off when i = 0. Is there some internal reason that this was changed?

I guess its not actually a timer if you want it to start now and run every 0 seconds… you can set the initial start time to be 0.00 if you want it to start immediately then run at timed intervals after that but if you want it to run at a interval of 0 then I guess you should just call the function directly because you could potentially say call every 0 seconds with loop…

Just call the function manually, directly after you set the timer if the value is zero? That’s what I do. or something like if i == 0 { MyFunction(); }

It’s kind of helpful for it to do nothing if it’s zero in many cases.