From: Jay Freeman (saurik) Date: Fri, 9 May 2008 11:28:08 +0000 (+0000) Subject: Add timestamping to _trace. X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/11bc1216c9018a1e19ef776e10c1004ac1e7e33d?hp=7d07c4ffc54ac78215cb20f56c6fac4b36dd3fb0 Add timestamping to _trace. --- diff --git a/UICaboodle/UICaboodle.h b/UICaboodle/UICaboodle.h index afdf71bd..1cf37d13 100644 --- a/UICaboodle/UICaboodle.h +++ b/UICaboodle/UICaboodle.h @@ -1,6 +1,13 @@ #include -#define _trace() fprintf(stderr, "_trace()@%s:%u[%s]\n", __FILE__, __LINE__, __FUNCTION__) +#include +#include + +#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)) { \