Here you can find the source of secondsFromNow(long seconds)
public static long secondsFromNow(long seconds)
//package com.java2s; //License from project: Open Source License import java.util.concurrent.TimeUnit; public class Main { public static long secondsFromNow(long seconds) { return System.currentTimeMillis() + toMillis(seconds, TimeUnit.SECONDS); }/* w w w . java 2 s.c o m*/ public static long toMillis(long duration, TimeUnit timeUnit) { return TimeUnit.MILLISECONDS.convert(duration, timeUnit); } }