Delays are slower then in Previous version

Hi,

I have noticed a strange discrepancy between Delays in version 4.8 and 4.13 of the engine. You can test it with a simple setup

In 4.8 the Setup takes approximately 10 seconds to finish. in 4.13 it takes 12 seconds.

Hi AlexW88,

The Delay node isn’t based off of actual in-game seconds but an approximation based off of your frame rate. So the delay node will be different at different frame rates. You are likely seeing this because of optimizations and/or changes from 4.8 to 4.13 that effects the frame rate of the editor. I also believe there was some minor changes to the delay node in recent versions.

However, I’m also not seeing anything as drastic as 12 seconds in 4.13. I still see around 10 and some change. Even going from 30, 60, 120 FPS it is only a small difference. All take about 10 secs with the setup you provided. Are you seeing this in a new project or the project you upgraded to 4.13?

Also, if you need things to happen at exact times, I suggest using the TimeSpan nodes to set that up.

Alright! Actually there is no discrepancy between 4.8 and 4.13. The discrepancy happens at uneven framerates.

  • FPS locked to 20 = 10 seconds
  • FPS locked to 25 = 12 seconds
  • FPS locked to 30 = 10 seconds

This seem like quite an Issue to me but it might be just “by design”. However if this is not fixable I really need an usable alternative to delays. Some inaccuracy is ok but 1/5 is really too much. I have been looking into timespans, but it mostly seem to be about formating time and date and system time also seem to be inaccurate often. I don’t want to create a super precise atomic clock, I only need to delay certain logic (e.g. gun firerates) with reasonable accuracy/performance.

Perhaps to get more accurate you could try something like this.

I would probably replace the Tick with a Timeline, but this seems to work fairly accurately.