For my research, I need to have two devices sync to each other with very low delay (<1 ms). I understand that when they are connected to the same wifi router, they will get a different private IP address assigned by the router. Ideally, the ping between devices under the same local network should be very low. Unless I misunderstand something here.
In my experiment, I disconnected the router from the internet (unplugged the cable from the wall) and used one device to ping the router and the other device. The names and the IP addresses of the devices are:
the router: 192.168.1.254
device1: 192.168.1.122
device2: 192.168.1.154
The latency time are not what I expected: ping between the router and device1: image1; ping between device1 and device2: image2. I am expecting the time to be within 1 ms, which is not the case here. All devices are present in the same room and within 3 meters, so I don't think the connection is the issue here.
I am not sure how to fix this high latency. It is possible that I might misunderstand a few concepts here. Any help would be greatly appreciated.