StdLib: Eliminate TimerLib dependencies.
Implement the clock() function using the EFI time-of-day clock instead of a TimerLib instance. Signed-off-by: darylm503 Reviewed-by: jljusten Reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12683 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -27,8 +27,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <MainData.h>
|
||||
#include <sys/EfiSysCall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern int main( int, char**);
|
||||
extern int __sse2_available;
|
||||
@@ -149,13 +150,8 @@ ShellAppMain (
|
||||
errno = 0;
|
||||
EFIerrno = 0;
|
||||
|
||||
#ifdef NT32dvm
|
||||
gMD->ClocksPerSecond = 1; // For NT32 only
|
||||
gMD->AppStartTime = 1; // For NT32 only
|
||||
#else
|
||||
gMD->ClocksPerSecond = (clock_t)GetPerformanceCounterProperties( NULL, NULL);
|
||||
gMD->AppStartTime = (clock_t)GetPerformanceCounter();
|
||||
#endif /* NT32 dvm */
|
||||
gMD->ClocksPerSecond = 1;
|
||||
gMD->AppStartTime = (clock_t)((UINT32)time(NULL));
|
||||
|
||||
// Initialize file descriptors
|
||||
mfd = gMD->fdarray;
|
||||
|
Reference in New Issue
Block a user