How to find message delay

Is there a way to find how long it took between the send and receive of a message? Example, client A sends a message at time x, client received message at time y. Find the difference between time x and y. I need to know this time to be able to predict what to do on the clients for a true real time game, where a delay of more than 1/2 a second is noticeable. 

Check ^

PhotonPeer has getRoundTripTime() and getRoundTripTimeVariance() methods which measure delay between client and server. Averaging that values for 2 clients may give you an answer. If this is not enough, you should implement rtt measure between clients by yourself (client 1 sends ‘ping’ event, client 2 sends ‘ping answer’ event, client 1 calculates the difference)

Example for loadbalancing client (it uses internal undocumented gamePeer member):

if client.gamePeer then print("==========", client.gamePeer:getRoundTripTime(), client.gamePeer:getRoundTripTimeVariance()); end

Please also check documentation:

http://doc.exitgames.com/photon-cloud/api/lua/doc/modules/core-PhotonPeer.html#instance:getRoundTripTime

Check ^

PhotonPeer has getRoundTripTime() and getRoundTripTimeVariance() methods which measure delay between client and server. Averaging that values for 2 clients may give you an answer. If this is not enough, you should implement rtt measure between clients by yourself (client 1 sends ‘ping’ event, client 2 sends ‘ping answer’ event, client 1 calculates the difference)

Example for loadbalancing client (it uses internal undocumented gamePeer member):

if client.gamePeer then print("==========", client.gamePeer:getRoundTripTime(), client.gamePeer:getRoundTripTimeVariance()); end

Please also check documentation:

http://doc.exitgames.com/photon-cloud/api/lua/doc/modules/core-PhotonPeer.html#instance:getRoundTripTime