How to make an accurate timer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jackson King

I’m trying to make an accurate timer to a hundredth of a second, but Godot’s built in one seems a bit off.

What I’m currently doing is having a Timer set to 0.01 seconds with autostart on. When the Timer times out it adds one to a variable. When that variable is greater than 9 it resets itself back to 0 and adds one to the next variable, and so on.

Is there a better way to do it or am I just missing something?

How does the built-in seem of?
I haven’t had any problems with it.

Christoffer Schindel | 2019-04-19 18:09

It runs a bit slow, meaning that what should be a second is actually more like .9 seconds. Over time it quickly becomes more apparent.

Jackson King | 2019-04-19 18:14