summaryrefslogtreecommitdiff
path: root/debug.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-12 20:06:06 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-12 20:06:06 -0400
commit7610aec86df0fd5c49303a8ed984f16a0f0b1e1f (patch)
treed1dc8cfc48863aa067203083b2a702d5e4bba907 /debug.h
parent02be02011b33051bafd1639c534967c7626fabbb (diff)
downloadfork-ledger-7610aec86df0fd5c49303a8ed984f16a0f0b1e1f.tar.gz
fork-ledger-7610aec86df0fd5c49303a8ed984f16a0f0b1e1f.tar.bz2
fork-ledger-7610aec86df0fd5c49303a8ed984f16a0f0b1e1f.zip
added support for interval reporting; changed some option flags
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/debug.h b/debug.h
index 090d5830..86f57339 100644
--- a/debug.h
+++ b/debug.h
@@ -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