Hello I was try to make a quick benchmark between client and server, but I have notice that when comparing with os.time it wouldn’t return any numbers past the decimal point. So I was trying to know if there is any way that I can retrieve the numbers past the decimal?
local increment = 0
repeat
print(os.time() ) -- for example 1751981518 -- no decimal!
print(tick() ) -- for example 1751981518.3524965 -- decimals!
task.wait(.2)
until increment > 25
Are there any other better options to use rather than os.time() for the client while still being able to compare with the server with workspace:GetServerTimeNow()?
local now = DateTime.now()
print("now in ms:", now.UnixTimestampMillis)
print("now in sec but precise:", now.UnixTimestampMillis / 1000)
print("now in sec but not precise:", now.UnixTimestamp)
I will mark it as the solution even though its a bit wonky in a loop print.
– Edit:
I have noticed now that workspace:GetServerTimeNow has the decimal in order to give it the precise time which is in microseconds, while all the other ones just use milliseconds.