tmf.all: use ITmfTimestamp#toNanos when possible
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / tracecompass / internal / tmf / ui / viewers / statistics / StatisticsUpdateJob.java
index 293128d2d1f680b51fb0bc6a7a3db36a5b1caa0d..1b8e9cbdff2354f4d9173fc4e8d2b5e78846c31d 100644 (file)
@@ -26,7 +26,6 @@ import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
 import org.eclipse.tracecompass.tmf.core.statistics.ITmfStatistics;
 import org.eclipse.tracecompass.tmf.core.statistics.TmfStatisticsEventTypesModule;
 import org.eclipse.tracecompass.tmf.core.statistics.TmfStatisticsModule;
-import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
 import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
 
@@ -48,10 +47,6 @@ class StatisticsUpdateJob extends Job {
      */
     private static final long LIVE_UPDATE_DELAY = 1000;
 
-    /**
-     * Timestamp scale used for all statistics (nanosecond)
-     */
-    private static final byte TIME_SCALE = ITmfTimestamp.NANOSECOND_SCALE;
     private TmfTimeRange fTimerange;
 
     /**
@@ -122,8 +117,8 @@ class StatisticsUpdateJob extends Job {
              * The generic statistics are stored in nanoseconds, so we must make
              * sure the time range is scaled correctly.
              */
-            start = localtimeRange.getStartTime().normalize(0, TIME_SCALE).getValue();
-            end = localtimeRange.getEndTime().normalize(0, TIME_SCALE).getValue();
+            start = localtimeRange.getStartTime().toNanos();
+            end = localtimeRange.getEndTime().toNanos();
 
             Map<String, Long> map = stats.getEventTypesInRange(start, end);
             updateStats(map);
This page took 0.039632 seconds and 5 git commands to generate.