Hello
I have a seekbar and on value changed I send the value of the seekbar using UDPSocket which is a sub in a code module. Sometimes the listening device (a python script on a Raspberry pi) displays a lot of latency and it was suggested somewhere on the internet that this might be because the UDP packets are being sent too quickly from my phone. I don't know if this is true but I thought I would try slowing things down with a sleep(1) for instance. But for testing purposes even when I do sleep(2000) there is a 2 second delay from me moving my seekbar from 0 to value 255 and then the packets are all sent one after another so I have obviously mis-understood sleep(), or code modules or something. Can someone explain why the sleep happens once and then all the seekbar value changed events get sent in one sequence with now delay?
I have a seekbar and on value changed I send the value of the seekbar using UDPSocket which is a sub in a code module. Sometimes the listening device (a python script on a Raspberry pi) displays a lot of latency and it was suggested somewhere on the internet that this might be because the UDP packets are being sent too quickly from my phone. I don't know if this is true but I thought I would try slowing things down with a sleep(1) for instance. But for testing purposes even when I do sleep(2000) there is a 2 second delay from me moving my seekbar from 0 to value 255 and then the packets are all sent one after another so I have obviously mis-understood sleep(), or code modules or something. Can someone explain why the sleep happens once and then all the seekbar value changed events get sent in one sequence with now delay?