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.URL;
import sig.utils.DebugUtils;
public class FileManager {
String fileloc;
final String serverURL = "http://45.33.13.215/sigIRCv2/";
@ -12,6 +14,13 @@ public class FileManager {
public FileManager(String 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;
}

@ -65,10 +65,10 @@ public class SessionListWindow extends JFrame{
super.paintComponent(g);
//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);
if (sessionlist.getSelectedIndex()!=-1 &&
RabiRaceModule.module.session_listing.data.size()>sessionlist.getSelectedIndex()) {
if (selected!=-1 &&
RabiRaceModule.module.session_listing.data.size()>selected) {
//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);
}

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

Loading…
Cancel
Save