Execute scheduler on two threads instead of 1.

dev
sigonasr2 7 years ago
parent 93fc36ea5f
commit 065cb594a3
  1. BIN
      sigIRCv2.jar
  2. 9
      src/sig/FileManager.java
  3. 6
      src/sig/modules/RabiRace/SessionListWindow.java
  4. 3
      src/sig/modules/RabiRaceModule.java

Binary file not shown.

@ -5,6 +5,8 @@ import java.io.IOException;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import sig.utils.DebugUtils;
public class FileManager { public class FileManager {
String fileloc; String fileloc;
final String serverURL = "http://45.33.13.215/sigIRCv2/"; final String serverURL = "http://45.33.13.215/sigIRCv2/";
@ -12,6 +14,13 @@ public class FileManager {
public FileManager(String location) { public FileManager(String location) {
this.fileloc=location; this.fileloc=location;
if (fileloc.contains(" ")) {
System.out.println("!!!!!!!!!!!!!!!!!!");
System.out.println("!!!!!WARNING!!!!!!");
System.out.println("There is a space in the global file location "+fileloc+". This is going to cause huge errors!");
System.out.println("!!!!!!!!!!!!!!!!!!");
DebugUtils.showStackTrace();
}
this.folder=false; this.folder=false;
} }

@ -65,10 +65,10 @@ public class SessionListWindow extends JFrame{
super.paintComponent(g); super.paintComponent(g);
//Axis.GetAxisDisplay(g,window.ConstructTemporaryAxis(),0,0,window.axis_width,window.axis_height); //Axis.GetAxisDisplay(g,window.ConstructTemporaryAxis(),0,0,window.axis_width,window.axis_height);
//Axis.GetAxisIndicatorDisplay(g,window.ConstructTemporaryAxis(),0,0,window.axis_width,window.axis_height); //Axis.GetAxisIndicatorDisplay(g,window.ConstructTemporaryAxis(),0,0,window.axis_width,window.axis_height);
if (sessionlist.getSelectedIndex()!=-1 && if (selected!=-1 &&
RabiRaceModule.module.session_listing.data.size()>sessionlist.getSelectedIndex()) { RabiRaceModule.module.session_listing.data.size()>selected) {
//Get the players from that session. //Get the players from that session.
Session s = RabiRaceModule.module.session_listing.data.get(sessionlist.getSelectedIndex()); Session s = RabiRaceModule.module.session_listing.data.get(selected);
Profile.DrawMultiPanel(g,0,0,400,s.players); Profile.DrawMultiPanel(g,0,0,400,s.players);
} }

@ -86,7 +86,8 @@ public class RabiRaceModule extends Module{
//trimeadProfile.downloadProfile(); //trimeadProfile.downloadProfile();
} }
}, 5000, 5000, TimeUnit.MILLISECONDS); }, 5000, 5000, TimeUnit.MILLISECONDS);
scheduler.scheduleWithFixedDelay(()->{ ScheduledExecutorService scheduler2 = Executors.newScheduledThreadPool(1);
scheduler2.scheduleWithFixedDelay(()->{
if (foundRabiRibi) { if (foundRabiRibi) {
UpdateMyProfile(); UpdateMyProfile();
} }

Loading…
Cancel
Save