can you please how to calculate milliseconds in blackberry + java .I am getting time stamp like.
static public String getTimeStamp(){
String timeFormat = "HH.mm.ss";
Date now = new Date();
SimpleDateFormat sdf = new SimpleDateFormat(timeFormat);
return sdf.format(now);
}
Change your code to:
to get mislliseconds.
Another, more elegant way of doing this is:
Because modulo by 1000 gives you milliseconds.