Here you can find the source of timestampInMs()
public static long timestampInMs()
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; public class Main { public static long timestampInMs() { return getTimestamp().getTime(); }/* ww w . j av a2 s . c o m*/ public static Date getTimestamp() { return new java.sql.Timestamp(Calendar.getInstance().getTime().getTime()); } }