This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / um / sys-i386 / time.c
similarity index 62%
rename from arch/um/os-Linux/time.c
rename to arch/um/sys-i386/time.c
index cf30a39..a6a5ba7 100644 (file)
@@ -1,12 +1,15 @@
-#include <stdlib.h>
-#include <sys/time.h>
+/*
+ * sys-i386/time.c 
+ * Created             25.9.2002       Sapan Bhatia
+ *
+ */
 
-unsigned long long os_usecs(void)
+unsigned long long time_stamp(void)
 {
-       struct timeval tv;
+       unsigned long low, high;
 
-       gettimeofday(&tv, NULL);
-       return((unsigned long long) tv.tv_sec * 1000000 + tv.tv_usec);
+       asm("rdtsc" : "=a" (low), "=d" (high));
+       return((((unsigned long long) high) << 32) + low);
 }
 
 /*