import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
+import org.eclipse.linuxtools.tmf.ui.TmfUiRefreshHandler;
import org.eclipse.linuxtools.tmf.ui.viewers.TmfViewer;
import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfBaseColumnData;
import org.eclipse.linuxtools.tmf.ui.viewers.statistics.model.TmfBaseColumnDataProvider;
/** Timestamp scale used for all statistics (nanosecond) */
private static final byte TIME_SCALE = ITmfTimestamp.NANOSECOND_SCALE;
- /** The delay (in ms) between each update in live-reading mode */
- private static final long LIVE_UPDATE_DELAY = 1000;
-
/** The actual tree viewer to display */
private TreeViewer fTreeViewer;
return;
}
- viewerControl.getDisplay().asyncExec(new Runnable() {
+ TmfUiRefreshHandler.getInstance().queueUpdate(this, new Runnable() {
@Override
public void run() {
if (!viewerControl.isDisposed()) {
* being built (or, if the back-end is already
* completely built, it will skip over the while() immediately.
*/
- while (!ss.waitUntilBuilt(LIVE_UPDATE_DELAY)) {
+ while (!ss.waitUntilBuilt(TmfUiRefreshHandler.UPDATE_PERIOD)) {
Map<String, Long> map = stats.getEventTypesInRange(start, end);
updateStats(aTrace, isGlobal, map);
}