Here you can find the source of roundSec(long milli)
public static long roundSec(long milli)
//package com.java2s; //License from project: Mozilla Public License public class Main { public static long roundSec(long milli) { return ((milli + 500L) / 1000L) * 1000L; }//from w w w .j av a 2 s . c o m }