The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

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).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

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

Tobias
2011-11-17 14:45:43

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.

tutibueno
2011-11-19 20:38:37

Is it the same as .GetPing() function? Another question is how to get each players ping in the room?

Tazadar
2011-11-23 14:47:44

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

Kirchesch
2019-02-12 21:46:27

@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