Here you can find the source of getTime(Calendar c)
public static long getTime(Calendar c)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static long getTime() { return getTime(getCalendar()); }/* ww w. j a va 2s. c o m*/ public static long getTime(Calendar c) { return c.getTimeInMillis(); } public static Calendar getCalendar() { return Calendar.getInstance(); } }