Here you can find the source of getFullSecondsElapsedTimeMillis(long start, long end)
Parameter | Description |
---|---|
start | The start time. (Milliseconds) |
end | The end time. (Milliseconds). |
public static long getFullSecondsElapsedTimeMillis(long start, long end)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from www . j av a 2 s . co m*/ * Gets full seconds elapsed time millis. * @param start The start time. (Milliseconds) * @param end The end time. (Milliseconds). * @return The elapsed time between the start and end times, rounded up to a full second, in milliseconds. */ public static long getFullSecondsElapsedTimeMillis(long start, long end) { return ((long) Math.ceil((end - start) / 1000.0)) * 1000; } }