Merge "Temporarily fix the negative values in switch up latency test"
diff --git a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
index 77a6c7e..729f84b 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
@@ -165,6 +165,11 @@
                 main.log.warn("Error to decode Json object!")
                 break
             try:
+                #FIXME: the Device Event (PORT_ADD) we got from metrics app is not the one generated Graph Event
+                if DeviceTime > GraphTime:
+                    # This fixes the negative latency values. However we are not using the right Device Event
+                    # timestamp. This should be fixed later.
+                    DeviceTime = GraphTime
                 RR_Dtemp = DeviceTime - tempResultDict['RR']
                 D_Gtemp = GraphTime - DeviceTime
                 E_Etemp = GraphTime - tempResultDict['TCP']