List of utility methods to do Milliseconds
void | appendMillis(int millis, StringBuilder builder) append Millis builder.append("."); if (millis < 100) builder.append('0'); if (millis < 10) builder.append('0'); builder.append(millis); |
String | calcDate(long millisecs) calc Date String timezone = "UTC"; SimpleDateFormat date_format = new SimpleDateFormat("MMM dd yyyy HH:mm:ss.SSS"); date_format.setTimeZone(TimeZone.getTimeZone("timezone")); Date resultdate = new Date(millisecs); return date_format.format(resultdate) + " " + timezone; |
long | calculateDaysBackIntoMilliseconds(Integer value) rechnet Tage (Integer) in Millisekunden zurück und gibt eine long wert zurueck return (long) value.intValue() * 24 * 3600 * 1000; |
String | calculateHMSFromMilliseconds(long timeInMilliSeconds) Converts the time in seconds into hours, minutes and seconds. return calculateHMS((int) (timeInMilliSeconds / 1000), false); |
long | computeEclipseTimeMilliseconds(final long beginTime) compute Eclipse Time Milliseconds return System.currentTimeMillis() - beginTime;
|
String | concatMillis(String name) concat Millis return name + System.currentTimeMillis();
|
Date | CreateDate(long milliseconds) Convenience method for creating a date object. Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(milliseconds);
return cal.getTime();
|
Calendar | createFromMillis(long milliseconds) create From Millis Calendar c = Calendar.getInstance();
c.setTimeInMillis(milliseconds);
return c;
|
String | csvAnnotatedMilliString(long totaltime) csv Annotated Milli String return "" + totaltime + " ms, " + totaltime / 1000 + " sec, " + totaltime / (60 * 1000) + " min, " + totaltime / (60 * 60 * 1000) + " hrs"; |
long | cutoffTimeMillis(long time) Cutoff milliseconds from a time value return (long) Math.floor(((double) time) / 1000) * 1000; |