Reliability of time functions
Could somebody (preferably Chip himself :P) answer me in detail how the functions below calculate the time, and what timezone they're in.
1. GetTimeStamp 2. GetFormattedTime 3. GetTimeString 4. GetDate 5. GetGameTimeMilliseconds 6. GetFrameTimeMilliseconds 7. GetFrameTimeSeconds 8. GetSecondsSinceMidnight I'm particularly interested if any of the functions are based on the server's local time instead of the client's. Thanks in advance! |
Quote:
|
Quote:
1. Is UTC+0 for everybody, including the server. It is client local, but if synced with Network Time Protocol*, the same time as the server has. UNIX timestamp: Seconds since 1/1/1971 5. Milliseconds since program started. (Not since character in world) 6/7: Same as 5, but a snapshot for the frame currently rendered. GetGameTimeMilliseconds>=GetFrameTimeMilliseconds. If greather than 16.667ms no more 60fps. 8: Client local seconds of the day, including daylight saving. Current time shift compared to 1: Code:
local localTimeShift = GetSecondsSinceMidnight() -(GetTimeStamp() % 86400) |
Quote:
|
Quote:
https://technet.microsoft.com/en-us/...=ws.10%29.aspx: "Support boundary to configure the Windows Time service for high accuracy environments We do not guarantee and we do not support the accuracy of the W32Time service between nodes on a network. The W32Time service is not a full-featured NTP solution that meets time-sensitive application needs. The W32Time service is primarily designed to do the following: Make the Kerberos version 5 authentication protocol work. Provide loose sync time for client computers.The W32Time service cannot reliably maintain sync time to the range of 1 to 2 seconds. Such tolerances are outside the design specification of the W32Time service." Kerberos tolerance is about 5min. If you want to do that, you may need to download a real NTP client. |
thanks all for making things clear here.
i started the discussion about it yesterday in our dev-chat :D the reason behind this question is that i want to make a combat log export, like wow logs, and for this all timestamps from all players (for e.g. in group) have to be in sync. otherwise you'll have an offset. i think i have to add a datasync before the fight starts, to get all players in sync :/ i hoped that i don't have to :( |
Thank you so much Votan and Ayantir for the excellent information and coolmodi and silentgecko for the enlightening discussion. :D
|
All times are GMT -6. The time now is 07:02 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI