public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay
@ 2023-02-08 23:09 Michael D Kinney
  2023-02-08 23:17 ` [edk2-devel] " Michael D Kinney
  0 siblings, 1 reply; 5+ messages in thread
From: Michael D Kinney @ 2023-02-08 23:09 UTC (permalink / raw)
  To: devel; +Cc: Deric Cole, Andrew Fish, Ray Ni

From: Deric Cole <deric.cole@intel.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4339

Thunk->Sleep is expecting nanoseconds, no need to multiply by 100.

Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Deric Cole <deric.cole@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 EmulatorPkg/Include/Protocol/EmuThunk.h       | 2 +-
 EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/EmulatorPkg/Include/Protocol/EmuThunk.h b/EmulatorPkg/Include/Protocol/EmuThunk.h
index b720023ac9c7..c419d0a67790 100644
--- a/EmulatorPkg/Include/Protocol/EmuThunk.h
+++ b/EmulatorPkg/Include/Protocol/EmuThunk.h
@@ -130,7 +130,7 @@ UINT64
 typedef
 VOID
 (EFIAPI *EMU_SLEEP)(
-  IN  UINT64    Milliseconds
+  IN  UINT64    Nanoseconds
   );
 
 typedef
diff --git a/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c b/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c
index 8c4f20f42b47..5344719f98d8 100644
--- a/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c
+++ b/EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c
@@ -1,7 +1,7 @@
 /** @file
   A non-functional instance of the Timer Library.
 
-  Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2007 - 2023, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -65,7 +65,7 @@ NanoSecondDelay (
              );
   if (!EFI_ERROR (Status)) {
     Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
-    Thunk->Sleep (NanoSeconds * 100);
+    Thunk->Sleep (NanoSeconds);
     return NanoSeconds;
   }
 
-- 
2.37.1.windows.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-09  1:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08 23:09 [Patch 1/1] EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay Michael D Kinney
2023-02-08 23:17 ` [edk2-devel] " Michael D Kinney
2023-02-09  1:02   ` Ni, Ray
2023-02-09  1:07   ` 回复: " gaoliming
2023-02-09  1:20     ` Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox