Here you can find the source of getCurrentTime()
public static long getCurrentTime()
//package com.java2s; import android.text.format.Time; public class Main { private static final Time time = new Time(); /**/*ww w . j a va2 s . co m*/ * Get the current time in seconds since January 1, 1970 * * @return long - see description... */ public static long getCurrentTime() { time.setToNow(); long now = time.toMillis(false) / 1000; return now; } }