diff options
| -rw-r--r-- | dc/dc.c | 2 | ||||
| -rw-r--r-- | teensy/teensy_log.h | 8 |
2 files changed, 9 insertions, 1 deletions
@@ -78,7 +78,7 @@ int main(void) ty_sleep(1000 / hints.ticrate); - ty_log_info("%g ms", (float)(clock() - start) / CLOCKS_PER_SEC); + ty_log_debug("%g ms", (float)(clock() - start) / CLOCKS_PER_SEC); } ty_free_image(img); diff --git a/teensy/teensy_log.h b/teensy/teensy_log.h index 825ce55..9c54d62 100644 --- a/teensy/teensy_log.h +++ b/teensy/teensy_log.h @@ -15,6 +15,14 @@ #define ty_log_fatal(ec, fmt, ...) \ (ty_log_msg(stderr, __FILE__, __LINE__, "fatal", fmt, ## __VA_ARGS__), \ exit(ec)) + +#if defined(TEENSY_DEBUG) || !defined(NDEBUG) +#define ty_log_debug(fmt, ...) \ + ty_log_msg(stderr, __FILE__, __LINE__, "debug", fmt, ## __VA_ARGS__) +#else +#define ty_log_debug(fmt, ...) +#endif // TEENSY_DEBUG + #define ty_olog(fmt, ...) \ _log_plain(stdout, fmt, ## __VA_ARGS__) #define ty_elog(fmt, ...) \ |
