hosts now send info then wait rather than wait then send

#story[1188]
main
hba56 8 years ago
parent 42ac733d72
commit 5676d435b0

@ -26,16 +26,15 @@ public class MatchBrowserHostRunnable implements RunnableWithFramePeriod {
long previousFrameTime = System.currentTimeMillis(); long previousFrameTime = System.currentTimeMillis();
while (!Thread.interrupted()) { while (!Thread.interrupted()) {
long currentFrameTime = System.currentTimeMillis();
waitForFramePeriod(previousFrameTime, currentFrameTime, 10000);
previousFrameTime = currentFrameTime;
try{ try{
matchBrowserInterface.sendOutGameInfo(gameInfo, socket); matchBrowserInterface.sendOutGameInfo(gameInfo, socket);
}catch (IOException e){ }catch (IOException e){
System.err.println("HostGameMessage could not be sent"); System.err.println("HostGameMessage could not be sent");
} }
long currentFrameTime = System.currentTimeMillis();
waitForFramePeriod(previousFrameTime, currentFrameTime, 10000);
previousFrameTime = currentFrameTime;
} }
} }
} }

Loading…
Cancel
Save