How to get the ping value ?

Options
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
    Options
    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
    Options
    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
  • Kirchesch
    Kirchesch
    edited February 2019
    Options
    Tazadar said:

    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.