Here you can find the source of roundMillisWithSecondPrecision(long l)
public static long roundMillisWithSecondPrecision(long l)
//package com.java2s; //License from project: Apache License public class Main { public static long roundMillisWithSecondPrecision(long l) { return Math.round(((double) l) / 1000) * 1000; }/*w ww . ja v a 2s.co m*/ }