For time you can try:
DateFormat df = new SimpleDateFormat("hh:mm");
Calendar calendar = Calendar.getInstance();
Date date = new Date();
System.out.printf("calendar time = %s%n date = %s%ntime = %s%n",
calendar.getTime(), date, df.format(date));
For milliseconds you can use
System.currentTimeMillis().