]> git.saurik.com Git - cydia.git/commitdiff
Add timestamping to _trace.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 9 May 2008 11:28:08 +0000 (11:28 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:08:01 +0000 (07:08 +0000)
UICaboodle/UICaboodle.h

index afdf71bdd6b6989765d5eeb94520c4640b4e3796..1cf37d13f50219d1c322dd8a599ae2dbf41087f4 100644 (file)
@@ -1,6 +1,13 @@
 #include <objc/objc.h>
 
-#define _trace() fprintf(stderr, "_trace()@%s:%u[%s]\n", __FILE__, __LINE__, __FUNCTION__)
+#include <sys/time.h>
+#include <time.h>
+
+#define _trace() do { \
+    struct timeval _tv; \
+    gettimeofday(&_tv, NULL); \
+    fprintf(stderr, "%lu.%.6u:_trace()@%s:%u[%s]\n", _tv.tv_sec, _tv.tv_usec, __FILE__, __LINE__, __FUNCTION__); \
+} while (false)
 
 #define _assert(test) do \
     if (!(test)) { \