Here you can find the source of hasPassed10Second(Calendar time)
public static boolean hasPassed10Second(Calendar time)
//package com.java2s; import java.util.Calendar; public class Main { public static boolean hasPassed10Second(Calendar time) { Long currentTime = Calendar.getInstance().getTimeInMillis(); Long compareTime = time.getTimeInMillis(); if (currentTime - compareTime > 1000 * 10) { return true; } else {//from w w w. ja v a 2 s .c o m return false; } } }