Skip to content

Commit

Permalink
log message timestamps should be unsigned long
Browse files Browse the repository at this point in the history
  • Loading branch information
dkerr64 committed Jul 14, 2024
1 parent d05f8f4 commit 2dbd735
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/homekit_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void logToBuffer_P(const char *fmt, ...);
#define DEBUG(message, ...) HOMEKIT_PRINTF(">>> %s: " message "\n", __func__, ##__VA_ARGS__)
static uint32_t start_time = 0;
#define DEBUG_TIME_BEGIN() start_time=millis();
#define DEBUG_TIME_END(func_name) HOMEKIT_PRINTF("### [%7d] %s took %6dms\n", millis(), func_name, (millis() - start_time));
#define DEBUG_TIME_END(func_name) HOMEKIT_PRINTF("### [%7lu] %s took %6lu ms\n", millis(), func_name, (millis() - start_time));
#define DEBUG_HEAP() DEBUG("Free heap: %d", system_get_free_heap_size());

#else
Expand All @@ -50,7 +50,7 @@ static uint32_t start_time = 0;

#if HOMEKIT_LOG_LEVEL >= HOMEKIT_LOG_ERROR

#define ERROR(message, ...) HOMEKIT_PRINTF("!!! [%7d] HomeKit: " message "\n", millis(), ##__VA_ARGS__)
#define ERROR(message, ...) HOMEKIT_PRINTF("!!! [%7lu] HomeKit: " message "\n", millis(), ##__VA_ARGS__)

#else

Expand All @@ -60,7 +60,7 @@ static uint32_t start_time = 0;

#if HOMEKIT_LOG_LEVEL >= HOMEKIT_LOG_INFO

#define INFO(message, ...) HOMEKIT_PRINTF(">>> [%7d] HomeKit: " message "\n", millis(), ##__VA_ARGS__)
#define INFO(message, ...) HOMEKIT_PRINTF(">>> [%7lu] HomeKit: " message "\n", millis(), ##__VA_ARGS__)
#define INFO_HEAP() INFO("Free heap: %d", system_get_free_heap_size());

#else
Expand Down

0 comments on commit 2dbd735

Please sign in to comment.