In games like Europa Universalis or Hearts of Iron, there is a way to set game speed. This affects how long does e.g. one in-game day take in real-life time.
At first, I thought this mechanism was independent from framerate, i.e. measuring actual time passed, but that cannot be true: For example, speed 5 is faster on a faster machine than on a slower machine. Still, on both machines, the proportional difference between speed 5 and speed 1 is the same. And you can still take actions while the game is paused (speed = 0).
How is this implemented? In the context of the Godot engine (and gdscript), which provides _process and _physics_process methods, what is the right approach to achieve this?