From 11bc1216c9018a1e19ef776e10c1004ac1e7e33d Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 9 May 2008 11:28:08 +0000 Subject: [PATCH 1/1] Add timestamping to _trace. --- UICaboodle/UICaboodle.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)) { \ -- 2.45.2