I don’t what is wrong with the GetRealTimeSeconds() function from the GetWorld() called from the ULocalPlayer.
I call the function several times and the function returns strange values.
As you can see in the log, the time is accurate at the first call, but then the value is completely wrong.
I think I have an explanation about this distortion.
The ULocalPlayer GetWorld function takes the world from the viewport.
When the player travel to another map, the world is created, therefore the time is reset.
I’m back.
I’ve understood my problem.
The GetTimeSeconds function is related to the loaded world.
What is the equivalent function to obtain the time since the game started ?