1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question about timings

Discussion in 'Java' started by uhdwo, May 18, 2020.

  1. uhdwo

    uhdwo Member

    May 18, 2020
    Likes Received:
    So my server is running good with 300-400+ daily players on a skyblock

    I taking timings and always wanna optimize better. I see in the timings it says "Minecraft::Minecraft Scheduler (SELF)" it takes like 10-15% if not more sometimes

    What is that and what can cause it?
    plz let me know if you need whole timing, plugins and etc ​
  2. novastosha

    novastosha Well-Known Member

    Jan 11, 2019
    Likes Received:
    --- Double Post Merged, May 30, 2020, Original Post Date: May 30, 2020 ---
    Because using sleep method on server main thread will keep it down and it will dump so yeh

    Code (Java):
    1. public class UrClass extends Thread {
    2.     @Override
    3.     public void run() {
    4.         int i = 0;
    5.         while (i <= 10) {
    6.             System.out.println(i);
    7.             i++;
    8.             try{
    9.                 sleep(1000);
    10.             }catch (InterruptedException e){
    11.                 System.out.println("Second thread is down");
    12.             }
    13.         }
    14.         System.out.println("Thread finished please keep these two lines in the end or remove them");
    16.     }
    Starting ur thread
    Code (Java):
    1.         UrClass testing = new UrClass();
    2.         testing.start();

Share This Page