# Time Discrepancy between Delay, Timer, and Timeline

**URL:** <https://forums.unrealengine.com/t/time-discrepancy-between-delay-timer-and-timeline/157397>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [February 4, 2021, 7:26pm UTC](https://forums.unrealengine.com/t/time-discrepancy-between-delay-timer-and-timeline/157397 "2021-02-04T19:26:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DehoEdeba](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dehoedeba/32/88710_2.png) [@DehoEdeba](https://forums.unrealengine.com/u/DehoEdeba)\
**Post date:** [February 4, 2021, 7:26pm UTC](https://forums.unrealengine.com/t/time-discrepancy-between-delay-timer-and-timeline/157397/1 "2021-02-04T19:26:03Z")

</div>

Hello everyone,

I’ve been puzzled by discovering that Delay (time = 1), Set timer by event (time = 1) and Timeline (length = 1) all give different results to me.

The exact time those 3 time management methods “trigger” seem to differ slightly.

I’ve created a simple Uasset actor to drop into the world, that will print the trigger times to the screen using the “Now” node. You’ll find it here :  
[https://www.mediafire.com/file/cup7r…cy.uasset/file](https://www.mediafire.com/file/cup7ra7a51zuzn6/BP_TestTimeDiscrepancy.uasset/file)

Is it a known, normal behaviour? It’s probably nothing but I must say it kinda shook my trust in these nodes since now I’m left wondering which one is “more correct” and if I should avoid at all cost “mixing” them (like launching a 1 second timeline and planning a Timer trigger midway to do something else).

![Capture d’écran 2.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/6/864be45ef5211405e803ed0b7c90ece454b959bd.png)

Thanks for your opinion 🙂

---

<div class="post-metadata">

**Author:** ![Nawrot](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nawrot/32/618260_2.png) [@Nawrot](https://forums.unrealengine.com/u/Nawrot)\
**Post date:** [February 5, 2021, 10:26am UTC](https://forums.unrealengine.com/t/time-discrepancy-between-delay-timer-and-timeline/157397/2 "2021-02-05T10:26:34Z")

</div>

This is probably as intended, i do not know exactly how all of those methods count time, but:

timer by event is meant to be most precise, it is basically triggered event directly from engine (from C++ level), and blueprints process it when triggered. Not sure if those are improved, but having many of them made my code really easy to crash (broken link or lost reference to trigger was major pita).  
delay, is processed every frame together with all blueprints, this stuff may be delayed, or not triggered in equal intervals.  
never played with timelines really, i prefer interpto and slightly improved event tick

---

<div class="post-metadata">

**Author:** ![ConradG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ConradG](https://forums.unrealengine.com/u/ConradG)\
**Post date:** [February 5, 2021, 10:36am UTC](https://forums.unrealengine.com/t/time-discrepancy-between-delay-timer-and-timeline/157397/3 "2021-02-05T10:36:07Z")

</div>

@DehoEdeba since you’re testing time differences, have also testing in a development build?

It’s not surprising that Timelines are off from the other two, they seem to have more under the hood. As @Nawrot states, timers are once again the most reliable way to perform delays. And I’ll add that they are the most flexible. I also remember reading another forum post about how timelines use timers (assuming that meant under the hood).

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 5, 2021, 1:04pm UTC](https://forums.unrealengine.com/t/time-discrepancy-between-delay-timer-and-timeline/157397/4 "2021-02-05T13:04:16Z")

</div>

> [@DehoEdeba](#):
>
> Hello everyone,
> 
> I’ve been puzzled by discovering that Delay (time = 1), Set timer by event (time = 1) and Timeline (length = 1) all give different results to me.
> 
> The exact time those 3 time management methods “trigger” seem to differ slightly.
> 
> I’ve created a simple Uasset actor to drop into the world, that will print the trigger times to the screen using the “Now” node. You’ll find it here :  
> [https://www.mediafire.com/file/cup7r…cy.uasset/file](https://www.mediafire.com/file/cup7ra7a51zuzn6/BP_TestTimeDiscrepancy.uasset/file)
> 
> Is it a known, normal behaviour? It’s probably nothing but I must say it kinda shook my trust in these nodes since now I’m left wondering which one is “more correct” and if I should avoid at all cost “mixing” them (like launching a 1 second timeline and planning a Timer trigger midway to do something else).
> 
> ![Capture d’écran 2.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/6/864be45ef5211405e803ed0b7c90ece454b959bd.png)
> 
> Thanks for your opinion 🙂

I’d also time it using GameTimeInSeconds.

These timed nodes aren’t meant to be totally accurate, it’s just a best attempt taking into account frame rate and cpu load.

---

<div class="post-metadata">

**Author:** ![DehoEdeba](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dehoedeba/32/88710_2.png) [@DehoEdeba](https://forums.unrealengine.com/u/DehoEdeba)\
**Post date:** [February 5, 2021, 5:28pm UTC](https://forums.unrealengine.com/t/time-discrepancy-between-delay-timer-and-timeline/157397/5 "2021-02-05T17:28:42Z")

</div>

Thanks for your ideas everyone, I appreciate it 😃

> [@anonymous\_user\_8ce2497dwrot](#):
>
> This is probably as intended, i do not know exactly how all of those methods count time, but:
> 
> timer by event is meant to be most precise, it is basically triggered event directly from engine (from C++ level), and blueprints process it when triggered. Not sure if those are improved, but having many of them made my code really easy to crash (broken link or lost reference to trigger was major pita).  
> delay, is processed every frame together with all blueprints, this stuff may be delayed, or not triggered in equal intervals.  
> never played with timelines really, i prefer interpto and slightly improved event tick

I didn’t know that Timers were fragile like you say. I’ll be careful not to abuse them.  
I’ve started using timelines more and more though, since they’re such a comfortable way of lerping values without resorting to the tick event. I don’t think I could go back ^^

> [@ClockworkOcean](#):
>
> I’d also time it using GameTimeInSeconds.
> 
> These timed nodes aren’t meant to be totally accurate, it’s just a best attempt taking into account frame rate and cpu load.

Ok I’ve been trying to time the triggers using GameTimeInSeconds and if anything it makes things more readable. I didn’t think the problem could come from the Now node.  
Unfortunately it doesn’t really change the situation. What’s infuriating is that it keeps changing: I have streaks where Delay = Timer with a premature Timeline but then I try a few minutes later and now Delay = Timeline and the Timer is off. So weird.

> [@ConradG](#):
>
> @DehoEdeba since you’re testing time differences, have also testing in a development build?
> 
> It’s not surprising that Timelines are off from the other two, they seem to have more under the hood. As @Nawrot states, timers are once again the most reliable way to perform delays. And I’ll add that they are the most flexible. I also remember reading another forum post about how timelines use timers (assuming that meant under the hood).

Indeed timelines seem to be more often than not the “outlier”. What’s funny is that it consistently triggers slightly BEFORE one second when the other two methods only ever trigger AFTER one second.

Anyway I’m just splitting hair here I suppose, uncovering an irrelevant engine or CPU limitation. We’re talking very small time differences here, after all. If I think too much about it it bothers me a lot, so I guess I should simply stop thinking about it.  
I suppose time is just a social construct ^^

---

<div class="post-metadata">

**Author:** ![Nawrot](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nawrot/32/618260_2.png) [@Nawrot](https://forums.unrealengine.com/u/Nawrot)\
**Post date:** [February 9, 2021, 11:51am UTC](https://forums.unrealengine.com/t/time-discrepancy-between-delay-timer-and-timeline/157397/6 "2021-02-09T11:51:43Z")

</div>

> [@DehoEdeba](#):
>
> T
> 
> Anyway I’m just splitting hair here I suppose, uncovering an irrelevant engine or CPU limitation. We’re talking very small time differences here, after all. If I think too much about it it bothers me a lot, so I guess I should simply stop thinking about it.  
> I suppose time is just a social construct ^^

You probably never need such precise timing for a game project. Excessive and fast timing may have quite big hit on performance, and that is how i know those timers and event tick differences.  
I tried to optimize android game with 200-400 actors that needed update (spawning visible mesh, collision and physics body when they in range).

First attempt to do it during event tick was disaster, ate all cpu instantly.  
Then i tried timers it was even worse, too easy to destroy actor and leave timer unhandled.

Then back to event tick, but this time i updated only 1/4th of them per tick. And that was best solution. Bit more experimenting and game looked ok up to updating 1/4th every half second.

So you probably do not need those timers to be precise and update in exact frame you need, most people will not notice difference.
