Create a stopwatch (counting up timer) and add it to a label

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

I’ve seen this Q&A:

But I was wondering how to add deciseconds and centiseconds to the stopwatch (milliseconds would be nice but I could live with just 2 digits), the way that Q&A suggests, with the func _process(delta) I can only get track of the seconds elapsed.
And using the OS.get_unix_time() seems expensive and would not be able to pause the game (or at least I don’t know how with that approach).

Why I would need to know the tenths of a second elapsed?

Well, I have this platformer game and I want to time players their way to the end of the level and then make a best times screen, so the more digits: less probability of them ending up with a very similar time and more precise representation of their performance.

:bust_in_silhouette: Reply From: flurick

Sounds like OS.get_ticks_msec ( ) would work