Skip to content

Commit

Permalink
EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay
Browse files Browse the repository at this point in the history
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4339

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

Cc: Andrew Fish <[email protected]>
Cc: Ray Ni <[email protected]>
Signed-off-by: Deric Cole <[email protected]>
Reviewed-by: Michael D Kinney <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
  • Loading branch information
DericCole authored and mergify[bot] committed Feb 9, 2023
1 parent b59e6fd commit f6ce1a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion EmulatorPkg/Include/Protocol/EmuThunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ UINT64
typedef
VOID
(EFIAPI *EMU_SLEEP)(
IN UINT64 Milliseconds
IN UINT64 Nanoseconds
);

typedef
Expand Down
4 changes: 2 additions & 2 deletions EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.c
Original file line number Diff line number Diff line change
@@ -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
**/
Expand Down Expand Up @@ -65,7 +65,7 @@ NanoSecondDelay (
);
if (!EFI_ERROR (Status)) {
Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
Thunk->Sleep (NanoSeconds * 100);
Thunk->Sleep (NanoSeconds);
return NanoSeconds;
}

Expand Down

0 comments on commit f6ce1a5

Please sign in to comment.