diff options
Diffstat (limited to 'src/cadet/cadet.h')
-rw-r--r-- | src/cadet/cadet.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/cadet/cadet.h b/src/cadet/cadet.h index 3ff93c254..049f3a85a 100644 --- a/src/cadet/cadet.h +++ b/src/cadet/cadet.h | |||
@@ -36,7 +36,22 @@ extern "C" | |||
36 | 36 | ||
37 | #include <stdint.h> | 37 | #include <stdint.h> |
38 | 38 | ||
39 | #define CADET_DEBUG GNUNET_YES | 39 | #if !defined(GNUNET_CULL_LOGGING) |
40 | #define CADET_TIMING_START \ | ||
41 | struct GNUNET_TIME_Absolute __timestamp;\ | ||
42 | __timestamp = GNUNET_TIME_absolute_get() | ||
43 | |||
44 | #define CADET_TIMING_END \ | ||
45 | struct GNUNET_TIME_Relative __duration;\ | ||
46 | __duration = GNUNET_TIME_absolute_get_duration (__timestamp);\ | ||
47 | LOG (GNUNET_ERROR_TYPE_INFO, " %s duration %s\n",\ | ||
48 | __FUNCTION__,\ | ||
49 | GNUNET_STRINGS_relative_time_to_string (__duration, GNUNET_YES)); | ||
50 | #else | ||
51 | #define CADET_TIMING_START | ||
52 | #define CADET_TIMING_END | ||
53 | #endif | ||
54 | |||
40 | 55 | ||
41 | #include "platform.h" | 56 | #include "platform.h" |
42 | #include "gnunet_util_lib.h" | 57 | #include "gnunet_util_lib.h" |