Make sure to enforce actual wait time

This commit is contained in:
Travis Nickles 2018-12-01 00:58:50 -06:00
parent 26bbfdbf98
commit 81d08099a7

View File

@ -181,9 +181,9 @@ namespace DS4Windows
{ {
if (state && _udpServer == null) if (state && _udpServer == null)
{ {
udpChangeStatus = true;
TestQueueBus(() => TestQueueBus(() =>
{ {
udpChangeStatus = true;
_udpServer = new UdpServer(GetPadDetailForIdx); _udpServer = new UdpServer(GetPadDetailForIdx);
var UDP_SERVER_PORT = Global.getUDPServerPortNum(); var UDP_SERVER_PORT = Global.getUDPServerPortNum();
@ -315,7 +315,7 @@ namespace DS4Windows
ChangeUDPStatus(true); ChangeUDPStatus(true);
while (udpChangeStatus == true) while (udpChangeStatus == true)
{ {
Task.Delay(100); Thread.SpinWait(500);
} }
} }