diff options
Diffstat (limited to 'debug.h')
-rw-r--r-- | debug.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -81,6 +81,14 @@ inline bool _debug_active(const char * const cls) { } #define DEBUG_PRINT_(x) DEBUG_PRINT(_debug_cls, x) +#define DEBUG_PRINT_TIME(cls, x) { \ + char buf[256]; \ + std::strftime(buf, 255, "%Y/%m/%d", std::gmtime(&x)); \ + DEBUG_PRINT(cls, #x << " is " << buf); \ +} + +#define DEBUG_PRINT_TIME_(x) DEBUG_PRINT_TIME(_debug_cls, x) + #define CONFIRM(x) assert(x) #if RELEASE_LEVEL == DEVELOPER |