How to get the ping value ?
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
How to get the ping value ?
Tazadar
2011-11-16 19:38:13
Hello,
I compute my ping like that : ping = peer.RoundTripTime/2; but It seems that it does not take the jitter in that value. How can I compute the ping in an efficient way ?
Thank you very much.
Comments
Don't calculate your ping or rountrip time yourself. We do that, excluding any delay except the network lag. Use: PhotonNetwork.networkingPeer.RoundTripTime.
It's a measure in milliseconds and averaged to some extend.
Is it the same as .GetPing() function? Another question is how to get each players ping in the room?
My question was not "If I had to get the ping myself or not". I just wanted to know how to get the ping from the API (in order to display it on the client)
Thanks
@Tazadar wrote:
My question was not "If I had to get the ping myself or not".
I just wanted to know how to get the ping from the API (in order to display it on the client)
Thanks
if you have read wha Tobias sayid you would know how to do it.
EDIT: no need to be rude.
Back to top