import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal;
import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal;
-import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
}
AbstractSegmentStoreAnalysisModule module = getAnalysisModule();
- final long startTimeInNanos = getTimeInNanos(fCurrentRange.getStartTime());
- final long endTimeInNanos = getTimeInNanos(fCurrentRange.getEndTime());
+ final long startTimeInNanos = fCurrentRange.getStartTime().toNanos();
+ final long endTimeInNanos = fCurrentRange.getEndTime().toNanos();
if (module == null) {
setWindowRange(startTimeInNanos, endTimeInNanos);
redraw(statusMonitor, startTimeInNanos, startTimeInNanos, Collections.EMPTY_LIST);
public void updateModel(@Nullable ISegmentStore<ISegment> dataInput) {
// Update new window range
TmfTimeRange currentRange = TmfTraceManager.getInstance().getCurrentTraceContext().getWindowRange();
- long currentStart = getTimeInNanos(currentRange.getStartTime());
- long currentEnd = getTimeInNanos(currentRange.getEndTime());
+ long currentStart = currentRange.getStartTime().toNanos();
+ long currentEnd = currentRange.getEndTime().toNanos();
if (dataInput == null) {
if (!getDisplay().isDisposed()) {
Display.getDefault().syncExec(new Runnable() {
if (trace != null) {
final TmfTimeRange timeRange = TmfTraceManager.getInstance().getCurrentTraceContext().getWindowRange();
setWindowRange(
- timeRange.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue(),
- timeRange.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue());
+ timeRange.getStartTime().toNanos(),
+ timeRange.getEndTime().toNanos());
setData(getSegmentStoreAnalysisModule(trace));
updateRange(timeRange);
}
final AbstractSegmentStoreAnalysisModule analysisModuleOfClass = getSegmentStoreAnalysisModule(trace);
final TmfTimeRange timeRange = TmfTraceManager.getInstance().getCurrentTraceContext().getWindowRange();
setWindowRange(
- getTimeInNanos(timeRange.getStartTime()),
- getTimeInNanos(timeRange.getEndTime()));
+ timeRange.getStartTime().toNanos(),
+ timeRange.getEndTime().toNanos());
setData(analysisModuleOfClass);
}
private void setAnalysisModule(AbstractSegmentStoreAnalysisModule analysisModule) {
fAnalysisModule = analysisModule;
}
-
- private static long getTimeInNanos(final ITmfTimestamp currentTime) {
- return currentTime.normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
- }
}
\ No newline at end of file