Java examples for java.util:Second
seconds Between
//package com.java2s; import java.util.Date; public class Main { public static double secondsBetween(Date date1, Date date2) { long gapInMilliseconds = date2.getTime() - date1.getTime(); return Math.abs(gapInMilliseconds / (double) 1000); }/* w ww . j a va 2s. c om*/ }