diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-21 23:41:31 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-21 23:41:31 +0000 |
commit | 1ef41207dc5fe92acb63dc0e4d0e4d9fab2ff3d9 (patch) | |
tree | 817ad765aa53295eca94d95ed32590d7686fbfaf /InOsEmuPkg/Unix/Sec/EmuThunk.c | |
parent | 090f3fdbf96e4cba61de228b05cbeddeff387066 (diff) | |
download | edk2-platforms-1ef41207dc5fe92acb63dc0e4d0e4d9fab2ff3d9.tar.xz |
InOsEmuPkg: Add TimerLib for PEI, DXE_CORE, and DXE/EFI drivers/applications.
Start using MdeModulePkg MetronomeDxe driver. Add PEI and DXE_CORE TimerLibs that just call back to the emulator. Add a DXE/UEFI TimerLib that also does a gBS->WaitForEvent() if the stall is for a long period of time. Change the Thunk API for Sleep to nanoseconds.
Signed-off-by: andrewfish
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11872 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'InOsEmuPkg/Unix/Sec/EmuThunk.c')
-rw-r--r-- | InOsEmuPkg/Unix/Sec/EmuThunk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/InOsEmuPkg/Unix/Sec/EmuThunk.c b/InOsEmuPkg/Unix/Sec/EmuThunk.c index ca8be55a0f..194cf137f9 100644 --- a/InOsEmuPkg/Unix/Sec/EmuThunk.c +++ b/InOsEmuPkg/Unix/Sec/EmuThunk.c @@ -250,15 +250,15 @@ QueryPerformanceCounter ( VOID SecSleep ( - IN UINT64 Milliseconds + IN UINT64 Nanoseconds ) { struct timespec rq, rm; struct timeval start, end; unsigned long MicroSec; - rq.tv_sec = Milliseconds / 1000; - rq.tv_nsec = (Milliseconds % 1000) * 1000000; + rq.tv_sec = Nanoseconds / 1000000000; + rq.tv_nsec = Nanoseconds % 1000000000; // // nanosleep gets interrupted by our timer tic. |