Here you can find the source of getTimeAsInt()
public static final int getTimeAsInt()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static final int getTimeAsInt() { Calendar cal = Calendar.getInstance(); java.text.SimpleDateFormat sdf = new SimpleDateFormat("HHmmss"); String cdate = sdf.format(cal.getTime()); return Integer.parseInt(cdate); }//ww w .ja v a 2s. co m }