There is also this related issue on Github (link is splitted since new users can’t post more than 2 links on the first post) HTTPS COLON SLASH SLASH github DOT com PATH /godotengine/godot/issues/19636
I wonder, does anyone know of a way to get the actual OS timestamp in milliseconds in the latest Godot?
Silly me!
At the very end of the documentation, there is written:
Note: Unlike other methods that use integer timestamps, this method returns the timestamp as a float for sub-second precision.
Yes, this is exactly the solution!
To get milliseconds one must therefore simply multiply by 1000:
var current_timestamp = Time.get_unix_time_from_system()
print(current_timestamp)
var current_timestamp_in_milliseconds = current_timestamp*1000
print(current_timestamp_in_milliseconds)
Output:
Timestamp is:
1708369184.09893
Milliseconds are:
1708369184098.93