tmf: Replace ITmfTimestamp by long in ITmfStatistics API
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / statistics / ITmfStatistics.java
index f3547ab6ad31b8ef820e70df7187af963bcee0c0..46747496dd6a22390e28ed594376f32081373a77 100644 (file)
@@ -21,6 +21,10 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfStatsUpdatedSignal;
  * Provider for statistics, which is assigned to a trace. This can be used to
  * populate views like the Statistics View or the Histogram.
  *
+ * As a guideline, since any trace type can use this interface, all timestamps
+ * should be normalized to nanoseconds when using these methods
+ * ({@link ITmfTimestamp#NANOSECOND_SCALE}).
+ *
  * @author Alexandre Montplaisir
  * @since 2.0
  */
@@ -46,8 +50,7 @@ public interface ITmfStatistics {
      *            The end time of the query range. Has no effect if isGlobal is
      *            true.
      */
-    public void updateStats(final boolean isGlobal, ITmfTimestamp start,
-            ITmfTimestamp end);
+    public void updateStats(boolean isGlobal, long start, long end);
 
     /**
      * Return the total number of events in the trace.
@@ -73,7 +76,7 @@ public interface ITmfStatistics {
      *            End time of the time range
      * @return The number of events found
      */
-    public long getEventsInRange(ITmfTimestamp start, ITmfTimestamp end);
+    public long getEventsInRange(long start, long end);
 
     /**
      * Retrieve the number of events in the trace, per event type, in a given
@@ -85,8 +88,7 @@ public interface ITmfStatistics {
      *            End time of the time range
      * @return The map of <event_type, count>, for the given time range
      */
-    public Map<String, Long> getEventTypesInRange(ITmfTimestamp start,
-            ITmfTimestamp end);
+    public Map<String, Long> getEventTypesInRange(long start, long end);
 
     /**
      * Notify the statistics back-end that the trace is being closed, so it
This page took 0.024447 seconds and 5 git commands to generate.