What happens when you run a block of code faster than it can process the code in that block?

This code does not run every 100 milliseconds, it waits 100 milliseconds between every iteration. Important difference.

You’re synchronously calling that code, so the next iteration of that loop will occur after OnTick() returns.

Now if this were an actual timer tick (as opposed to a Thread.Sleep()) or the 500 ms of work would happen on a different thread, this would change.

Leave a Comment