summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UICaboodle/UICaboodle.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/UICaboodle/UICaboodle.h b/UICaboodle/UICaboodle.h
index afdf71b..1cf37d1 100644
--- a/UICaboodle/UICaboodle.h
+++ b/UICaboodle/UICaboodle.h
@@ -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)) { \