Java Milliseconds getFullSecondsElapsedTimeMillis(long start, long end)

Here you can find the source of getFullSecondsElapsedTimeMillis(long start, long end)

Description

Gets full seconds elapsed time millis.

License

Open Source License

Parameter

Parameter Description
start The start time. (Milliseconds)
end The end time. (Milliseconds).

Return

The elapsed time between the start and end times, rounded up to a full second, in milliseconds.

Declaration

public static long getFullSecondsElapsedTimeMillis(long start, long end) 

Method Source Code

//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;
    }
}

Related

  1. getDurationFromMillis(final long millis)
  2. getDurationSecFromMillisDouble(long millis)
  3. getElapsedTimeInMilliseconds(Date startDate, Date endDate)
  4. getExpirationInMilliSeconds(long currentTime, int expirationTime)
  5. getExpirationMillisAbs(int recordExpirationTimestamp)
  6. getLogTimeFromMillis(Long millis)
  7. getMillis()
  8. getMillis()
  9. getMillis(long ticks)