All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jpower.core.utils.ThreadUtils Maven / Gradle / Ivy

There is a newer version: 0.0.5
Show newest version
package jpower.core.utils;

public class ThreadUtils
{

    public static void sleep(long time)
    {
        try
        {
            Thread.sleep(time);
        }
        catch (InterruptedException e)
        {
        }
    }

    public static Thread start(Runnable action)
    {
        Thread thread = new Thread(action);
        thread.start();
        return thread;
    }

    public static Thread startDaemon(Runnable action)
    {
        Thread thread = new Thread(action);
        thread.setDaemon(true);
        thread.start();
        return thread;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy