]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiDpLib/DpUtilities.c
ShellPkg UefiDpLib: Remove TimerLib dependency
[mirror_edk2.git] / ShellPkg / Library / UefiDpLib / DpUtilities.c
index 032e7b4ce1bdd5cc50cd5df9b7cbc06100a01dcb..64f1830fcc92457d8436922c9de42705b16b996d 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Utility functions used by the Dp application.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.\r
-  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.\r
+  (C) Copyright 2015-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
@@ -17,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
@@ -68,6 +67,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