pcap.core: making some classes final
[deliverable/tracecompass.git] / pcap / org.eclipse.tracecompass.tmf.pcap.core / src / org / eclipse / tracecompass / internal / tmf / pcap / core / util / PcapEventFactory.java
index 5bbac26769424293fdc804127bfcffc13d445e66..26077c5f954e0076b1aebd5e3c0598428a5fc4f8 100644 (file)
@@ -44,7 +44,7 @@ import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp;
  *
  * @author Vincent Perot
  */
-public class PcapEventFactory {
+public final class PcapEventFactory {
 
     private static final String EMPTY_STRING = ""; //$NON-NLS-1$
 
@@ -72,11 +72,11 @@ public class PcapEventFactory {
         switch (scale) {
         case MICROSECOND:
             long us = trace.getTimestampTransform().transform(timestamp * 1000) / 1000;
-            tmfTimestamp = new TmfTimestamp(us, ITmfTimestamp.MICROSECOND_SCALE);
+            tmfTimestamp = TmfTimestamp.fromMicros(us);
             break;
         case NANOSECOND:
             long ns = trace.getTimestampTransform().transform(timestamp);
-            tmfTimestamp = new TmfTimestamp(ns, ITmfTimestamp.NANOSECOND_SCALE);
+            tmfTimestamp = TmfTimestamp.fromNanos(ns);
             break;
         default:
             throw new IllegalArgumentException("The timestamp precision is not valid!"); //$NON-NLS-1$
This page took 0.026091 seconds and 5 git commands to generate.