Feche1320 Posted March 21, 2012 Share Posted March 21, 2012 Is there any way to sync getTickCount client-side too? Link to comment
CapY Posted March 21, 2012 Share Posted March 21, 2012 getTickCount Client and Server function Link to comment
Feche1320 Posted March 21, 2012 Author Share Posted March 21, 2012 You know what sync is? ... Link to comment
Feche1320 Posted March 21, 2012 Author Share Posted March 21, 2012 I don't have the same getTickCount value on server than on client. Link to comment
-ffs-Sniper Posted March 21, 2012 Share Posted March 21, 2012 Feche is right about the fact that getTickCount is not the same client and server side due to the way it works. The tick count is actually the uptime or cputime (don't know exactly) of the machine the script is running at in miliseconds. So there is no way to sync those two functions directly. The only way to "sync" it would be starting the tick count server and client side at the same time and save that time difference. Although it won't be 100% exact since triggerEvents would delay the syncing progress. Link to comment
Feche1320 Posted March 21, 2012 Author Share Posted March 21, 2012 Yes, that's my point. Anyways, I solved it by sending to the client the remaining time, and not the whole amount of time. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now