summaryrefslogtreecommitdiff
path: root/StdLib/LibC/Main
diff options
context:
space:
mode:
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-11 00:32:31 +0000
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-11 00:32:31 +0000
commit8aa163da5ac7bf40d1a3b0612a46504dc56d16a2 (patch)
tree35d16404b59494864d7d04da2c2f0ba9b2889a8b /StdLib/LibC/Main
parent4b3d663f7b2f0db316f20c0ee86c7270c1338852 (diff)
downloadedk2-platforms-8aa163da5ac7bf40d1a3b0612a46504dc56d16a2.tar.xz
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
Diffstat (limited to 'StdLib/LibC/Main')
-rw-r--r--StdLib/LibC/Main/Main.c12
1 files changed, 4 insertions, 8 deletions
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 <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;