]> git.cworth.org Git - apitrace/blobdiff - os_posix.cpp
Handle VBO draw elements .
[apitrace] / os_posix.cpp
index 590738f36f51b97e411acc0226ce9f94d19e6316..3f54da2c9545fc516f1153427b5583ac47bb646a 100644 (file)
 
 #include <string.h>
 #include <stdio.h>
-#include <unistd.h>
 #include <stdlib.h>
+
+#include <unistd.h>
+#include <sys/time.h>
 #include <pthread.h>
 
 #include "os.hpp"
-#include "log.hpp"
 
 namespace OS {
 
@@ -97,6 +98,13 @@ DebugMessage(const char *format, ...)
    va_end(ap);
 }
 
+long long GetTime(void)
+{
+   struct timeval tv;
+   gettimeofday(&tv, NULL);
+   return tv.tv_usec + tv.tv_sec*1000000LL;
+}
+
 void
 Abort(void)
 {
@@ -106,8 +114,3 @@ Abort(void)
 
 } /* namespace OS */
 
-static void _uninit(void) __attribute__((destructor));
-static void _uninit(void) {
-    Log::Close();
-}
-