View Single Post
  #6  
Old 02-05-2012, 12:16 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
I find this method to be quite accurate:

PHP Code:
//place within a 0.05 second timeout
function handleTimeVar(){
  if(
this.time != timevar){
    
this.time timevar;
    
this.tv2 this.time 5;
    
this.timechange timevar2;
  }
}

public function 
getTimevar3(){
  return 
981048814 this.tv2 timevar2 this.timechange;

When I trigger to the server to compare the difference it's always about 0.25 seconds behind serverside timevar2, which would include the delay caused by latency.
Reply With Quote