System.currentTimeMillis returns a long primitive that represents the number of milliseconds since 00:00:00 GMT January 1, 1970. public class MainClass{ public static void main(String[] argv){ System.out.println(System.currentTimeMillis()); } }