package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets;
+import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
/** Relative to the start of the trace */
RELATIVE,
/** Absolute timestamp (ie, relative to the Unix epoch) */
- ABSOLUTE
+ CALENDAR,
+ /** timestamp displayed as a simple number */
+ NUMBER,
}
static public final int IMG_THREAD_RUNNING = 0;
*/
static public String formatTime(long time, TimeFormat format, Resolution resolution) {
// if format is absolute (Calendar)
- if (format == TimeFormat.ABSOLUTE) {
+ if (format == TimeFormat.CALENDAR) {
return formatTimeAbs(time, resolution);
+ } else if (format == TimeFormat.NUMBER) {
+ return NumberFormat.getInstance().format(time);
}
StringBuffer str = new StringBuffer();