From 8aa163da5ac7bf40d1a3b0612a46504dc56d16a2 Mon Sep 17 00:00:00 2001 From: darylm503 Date: Fri, 11 Nov 2011 00:32:31 +0000 Subject: 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 --- StdLib/LibC/Main/Main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'StdLib/LibC/Main') diff --git a/StdLib/LibC/Main/Main.c b/StdLib/LibC/Main/Main.c index 3a5cca5b24..59a72bd630 100644 --- a/StdLib/LibC/Main/Main.c +++ b/StdLib/LibC/Main/Main.c @@ -27,8 +27,9 @@ #include #include #include +#include #include -#include +#include 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; -- cgit v1.2.3