Here you can find the source of nowAsTimestamp()
public static Timestamp nowAsTimestamp()
//package com.java2s; //License from project: LGPL import java.sql.Timestamp; public class Main { /**/* w w w . j ava 2 s . co m*/ * Get now time as timestamp * @return timestamp object */ public static Timestamp nowAsTimestamp() { return new Timestamp(nowAsLong()); } /** * Get now time as long * @return long */ public static long nowAsLong() { return System.currentTimeMillis(); } }