Java Second Format calculateTimeInSeconds(long startTimeInMilliseconds, long endTimeInMilliseconds)

Here you can find the source of calculateTimeInSeconds(long startTimeInMilliseconds, long endTimeInMilliseconds)

Description

calculate Time In Seconds

License

Open Source License

Declaration

private static long calculateTimeInSeconds(long startTimeInMilliseconds, long endTimeInMilliseconds) 

Method Source Code

//package com.java2s;

public class Main {
    private static long calculateTimeInSeconds(long startTimeInMilliseconds, long endTimeInMilliseconds) {
        long timeInSeconds = endTimeInMilliseconds - startTimeInMilliseconds;
        float time = (float) timeInSeconds;
        float result = time / 1000;
        return (long) result;
    }//from w w  w.  j av a  2s  . c  o  m
}

Related

  1. _toSeconds(String strTime)
  2. addSecondCa(String d1, int timeSpan, String format)
  3. changeSecondsToTime(long seconds)
  4. compareDate(String fistDate, String secondDate, String format)
  5. elapsedSeconds(long startTime)
  6. elapsedSeconds2(long milli)