tmf.all: use ITmfTimestamp#toNanos when possible
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / internal / tmf / ui / project / dialogs / offset / OffsetDialog.java
index f1f4569c5379acc50117d3e7db1980e88e8d06a1..838dd48ce4c02ec11d7031c60b08d62e0f87b484 100644 (file)
@@ -136,7 +136,7 @@ public class OffsetDialog extends Dialog {
                 } else {
                     try {
                         ITmfTimestamp refTime = map.get(element);
-                        long ref = refTime == null ? 0 : refTime.normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+                        long ref = refTime == null ? 0 : refTime.toNanos();
                         Long newVal = TIME_FORMAT.parseValue(string, ref);
                         map.put((TmfTraceElement) element, new TmfNanoTimestamp(newVal));
                     } catch (ParseException e) {
@@ -153,7 +153,7 @@ public class OffsetDialog extends Dialog {
             if (ts == null) {
                 return ""; //$NON-NLS-1$
             }
-            return TIME_FORMAT.format(ts.normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue());
+            return TIME_FORMAT.format(ts.toNanos());
         }
     }
 
This page took 0.024433 seconds and 5 git commands to generate.