Here you can find the source of roundTimeStamp(long tstamp)
public static long roundTimeStamp(long tstamp)
//package com.java2s; /*//from w w w .jav a 2 s. c om * ==================================================================== * Copyright (c) 2004-2010 TMate Software Ltd. All rights reserved. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at http://svnkit.com/license.html * If newer versions of this license are posted there, you may use a * newer version instead, at your option. * ==================================================================== */ public class Main { public static long roundTimeStamp(long tstamp) { return (tstamp / 1000) * 1000; } }