]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PerformancePkg/Dp_App/DpUtilities.c
PerformancePkg Dp_App: Remove TimerLib dependency
[mirror_edk2.git] / PerformancePkg / Dp_App / DpUtilities.c
index b49844a058b8a3efe8e7db45f1c791ed56223351..d5840e8d6f833b39da257720f2f96918ea41829b 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
   Utility functions used by the Dp application.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -16,7 +17,6 @@
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/TimerLib.h>\r
 #include <Library/PeCoffGetEntryPointLib.h>\r
 #include <Library/PrintLib.h>\r
 #include <Library/HiiLib.h>\r
@@ -82,6 +82,10 @@ GetDuration (
   UINT64    Duration;\r
   BOOLEAN   Error;\r
 \r
+  if (Measurement->EndTimeStamp == 0) {\r
+    return 0;\r
+  }\r
+\r
   // PERF_START macros are called with a value of 1 to indicate\r
   // the beginning of time.  So, adjust the start ticker value\r
   // to the real beginning of time.\r