Here you can find the source of isFiveMinutesOlder(Calendar updatedAt)
public static boolean isFiveMinutesOlder(Calendar updatedAt)
//package com.java2s; import java.util.Calendar; import android.util.Log; public class Main { private static final String TAG = "Helper"; public static boolean isFiveMinutesOlder(Calendar updatedAt) { Calendar rightnow = Calendar.getInstance(); rightnow.add(Calendar.MINUTE, 5); int compare = updatedAt.compareTo(rightnow); Log.d(TAG, "compare: " + compare); return compare < 0; }//from w w w .jav a 2s . co m }