Usually taking a measurement over X seconds before you load the game provided the connection you are on isn't experiencing heavy packet loss will give you an accurate measurement of the typical delay.koitsu wrote:
The buffering methodology Tepples describes (re: the emulator working on input 4 frames behind what's active) is commonly used, but the problem is that 4 frames is sometimes too little, or in other cases too much. It's going to vary based on several variables, absolutely none of which your emulator/game/whatever has control over.
In peer to peer, its typically ping/2 rounded up to the nearest frame integer. Given the small amount of data that needs to be sent this is usually good enough 99% of the time and not a very difficult calculation to do.