Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class Main {
    /***
     * 
     * @param runnable
     * @param delayTime
     * @param size
     */
    public static void newScheduedThreadPool(Runnable runnable, long delayTime, int size) {
        ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(size);
        scheduledThreadPool.schedule(runnable, delayTime, TimeUnit.SECONDS);
    }
}