Java tutorial
import java.util.Calendar; public class Main { public static void main(String[] args) throws InterruptedException { Calendar cal = Calendar.getInstance(); // print current time in milliseconds System.out.println("Current time is : " + cal.getTimeInMillis()); } }