summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2008-05-09 11:28:08 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:08:01 +0000
commitdfaac1daef3116346d25c48b8709bfec253ab3ff (patch)
tree24bfd632b5a5c193110b8d956b1d4ffab85eb2d6 /UICaboodle
parent11108eb618b2b1e5244056d1605ea3e459b07054 (diff)
Add timestamping to _trace.
Diffstat (limited to 'UICaboodle')
-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)) { \