Fix clone of CtfTmfTimestamp in CtfTmfEvent.
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / ctfadaptor / CtfTmfEvent.java
index 9de76d1eb44e2cd161498d534f28033ffb9c37a8..4fc75aa137c11f4849f17e2866877ccea38cb03f 100644 (file)
@@ -28,7 +28,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 /**
  * A wrapper class around CTF's Event Definition/Declaration that maps all
  * types of Declaration to native Java types.
- * 
+ *
  * @version 1.0
  * @author Alexandre Montplaisir
  */
@@ -85,8 +85,7 @@ public final class CtfTmfEvent implements ITmfEvent, Cloneable {
         }
 
         /* Read the base event info */
-        Long offset = originTrace.getCTFTrace().getOffset();
-        this.timestamp = eventDef.getTimestamp() + offset;
+        this.timestamp = this.getTrace().getCTFTrace().timestampCyclesToNanos(eventDef.getTimestamp());
         this.sourceCPU = eventDef.getCPU();
         this.typeId = eventDef.getDeclaration().getId();
         this.eventName = eventDef.getDeclaration().getName();
@@ -144,6 +143,7 @@ public final class CtfTmfEvent implements ITmfEvent, Cloneable {
 
         /* Copy the fields over */
         this.fContent = (CtfTmfContent) other.fContent.clone();
+        this.fTimestamp = other.fTimestamp.clone();
     }
 
     /**
This page took 0.029462 seconds and 5 git commands to generate.