Conversation
Closer follow the logic of MCBE's RakNet implementation.
| This is incorrect, you need to handle the pong timestamp as well. Additionally, this is not required. The client simply sends what it has received so we can calculate round trip time by subtracting it from the current time. This makes things more complex without any reason. |
Also calculating round trip time would be essentially the same, we'd just be subtracting timestamp. |
| Are you sure that getPing returns the correct ping? |
Yes but you are not subtracting the same timestamp. And why do two extra subtraction operations when it already works? There is no point for this, it just adds extra complexity. |
| The correct solution is not this. Correct solution would be to use |
| This is exactly the same except we're using |
| I think you should remove the start timestamp part, nanoTime is already what you want |





Closer follow the logic of MCBE's RakNet implementation.