The code below gives me the current time. But it does not tell anything about milliseconds.
public static String getCurrentTimeStamp() { SimpleDateForm
You only have to add the millisecond field in your date format string:
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
The API doc of SimpleDateFormat describes the format string in detail.