hi. I saw in the whitepapers that the fps example has a ping indicator. How is it measured? Im asking this because i need it in my flash project
Thanks
Ping
Ping
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
ThomasLund
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Hum ok. So its easy. Thanks 
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
That is why you make sure all your times are in UTC by doing something like this in c#
which will read in a datetime string as a UTC date time and will convert it to your local time. Either that or leave it always as UTC since you only care about short intervals.
The other option is to send a ping message, mark the current time on the system it was sent, then note the difference between when you sent it and when the pong response message was received. Then it doesn't matter what time the server says it is because its how long it took your client to get there and back again. and you could do this with any message as long as you limit it to the response.
Code: Select all
DateTime convertedDate = DateTime.SpecifyKind(
DateTime.Parse(dateStr),
DateTimeKind.Utc);
DateTime dt = converted.DateToLocalTime();The other option is to send a ping message, mark the current time on the system it was sent, then note the difference between when you sent it and when the pong response message was received. Then it doesn't matter what time the server says it is because its how long it took your client to get there and back again. and you could do this with any message as long as you limit it to the response.