package net.northking.cctp.element.mobile.thread;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.Callable;

public class WaitThread implements Callable<Boolean> {
    private Logger logger = LoggerFactory.getLogger(WaitThread.class);

    private Integer waitTime;

    public WaitThread(Integer waitTime) {
        this.waitTime = waitTime;
    }

    @Override
    public Boolean call() throws Exception {
        try {
            long time = waitTime * 1000L;
            Thread.sleep(time);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            logger.error("",e);
        }
        return true;
    }
}
