Ooh I thought you were looking for smooth animation, the topic that I answered about. If you just want something to happen once every 5 seconds you could use setInterval like below.
Thereās also other options, e.g. you could use engine.getDeltaTime() to get the unclamped, actual time since the last frame and use a counter⦠Or you could use Date.now() to get the current time in milliseconds and calculate your own delta from the last event that way. Also thereās external libraries on GitHub for timers as well. These days I mostly just use setInterval thou with long timeouts for things that arenāt as important, and then just use getAnimationRatio for everything that needs to update each frameā¦