diff --git a/examples/CC3200/cs_dbg.h b/examples/CC3200/cs_dbg.h index 3befca14..8e86f92d 100644 --- a/examples/CC3200/cs_dbg.h +++ b/examples/CC3200/cs_dbg.h @@ -14,8 +14,8 @@ #define CS_ENABLE_DEBUG 0 #endif -#ifndef CS_LOG_TS_DIFF -#define CS_LOG_TS_DIFF 0 +#ifndef CS_LOG_ENABLE_TS_DIFF +#define CS_LOG_ENABLE_TS_DIFF 0 #endif #ifdef __cplusplus diff --git a/examples/MSP432/ccs/MSP432_MG_hello/cs_dbg.h b/examples/MSP432/ccs/MSP432_MG_hello/cs_dbg.h index 3befca14..8e86f92d 100644 --- a/examples/MSP432/ccs/MSP432_MG_hello/cs_dbg.h +++ b/examples/MSP432/ccs/MSP432_MG_hello/cs_dbg.h @@ -14,8 +14,8 @@ #define CS_ENABLE_DEBUG 0 #endif -#ifndef CS_LOG_TS_DIFF -#define CS_LOG_TS_DIFF 0 +#ifndef CS_LOG_ENABLE_TS_DIFF +#define CS_LOG_ENABLE_TS_DIFF 0 #endif #ifdef __cplusplus diff --git a/mongoose.c b/mongoose.c index 095e5a3f..dae31c2b 100644 --- a/mongoose.c +++ b/mongoose.c @@ -187,8 +187,8 @@ MG_INTERNAL void mg_close_conn(struct mg_connection *conn); #define CS_ENABLE_DEBUG 0 #endif -#ifndef CS_LOG_TS_DIFF -#define CS_LOG_TS_DIFF 0 +#ifndef CS_LOG_ENABLE_TS_DIFF +#define CS_LOG_ENABLE_TS_DIFF 0 #endif #ifdef __cplusplus @@ -279,14 +279,14 @@ enum cs_log_level cs_log_level = FILE *cs_log_file = NULL; -#ifdef CS_LOG_TS_DIFF +#if CS_LOG_ENABLE_TS_DIFF double cs_log_ts; #endif void cs_log_print_prefix(const char *func) { if (cs_log_file == NULL) cs_log_file = stderr; fprintf(cs_log_file, "%-20s ", func); -#ifdef CS_LOG_TS_DIFF +#if CS_LOG_ENABLE_TS_DIFF { double now = cs_time(); fprintf(cs_log_file, "%7u ", (unsigned int) ((now - cs_log_ts) * 1000000)); @@ -312,7 +312,7 @@ void cs_log_set_file(FILE *file) { void cs_log_set_level(enum cs_log_level level) { cs_log_level = level; -#if CS_LOG_TS_DIFF && CS_ENABLE_STDIO +#if CS_LOG_ENABLE_TS_DIFF && CS_ENABLE_STDIO cs_log_ts = cs_time(); #endif }