schedule TimerTask At Time - Android java.util

Android examples for java.util:Timer

Description

schedule TimerTask At Time

Demo Code


//package com.java2s;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

public class Main {
    private static Timer timer = new Timer();

    public static void scheduleAtTime(long time, TimerTask task) {
        timer.schedule(task, new Date(time));
    }/*from   w w w  . ja  v  a2 s  .  c  om*/
}

Related Tutorials