# Are timers not Independent of fps? (screenshots inside)

**URL:** <https://forums.unrealengine.com/t/are-timers-not-independent-of-fps-screenshots-inside/2483481>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [April 30, 2025, 2:44pm UTC](https://forums.unrealengine.com/t/are-timers-not-independent-of-fps-screenshots-inside/2483481 "2025-04-30T14:44:27Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [April 30, 2025, 3:01pm UTC](https://forums.unrealengine.com/t/are-timers-not-independent-of-fps-screenshots-inside/2483481/3 "2025-04-30T15:01:44Z")

</div>

> [@Userofunreal](#):
>
> how to get a timer that always constant in result?

This is at the end a sampling theorem problem – your main loop doesn’t run at a perfect 60 Hz, and thus any timers will be quantized to when the main loop/tick happens to actually run.

The most accurate way to deal with this, is to get the current game time inside tick, and accumulate that to a variable. Then enter a loop that checks whether the variable is greater than 1/60, if so, subtract 1/60 from the variable, run your “one tick” function, and then check the loop again. If a particular frame takes longer to run, you’ll run your “one tick” function more than once in a single game loop tick.

---

_[View the full topic](https://forums.unrealengine.com/t/are-timers-not-independent-of-fps-screenshots-inside/2483481)._
