Here you can find the source of currentTime(CharSequence inFormat)
public static CharSequence currentTime(CharSequence inFormat)
//package com.java2s; import android.text.format.DateFormat; public class Main { public static CharSequence currentTime(CharSequence inFormat) { return DateFormat.format(inFormat, System.currentTimeMillis()); }/*from w ww. java 2 s . c om*/ }