1 #ifndef _I3LOCK_H 2 #define _I3LOCK_H 3 4 // boy i sure hope this doesnt change in the future 5 #define NANOSECONDS_IN_SECOND 1000000000 6 7 /* This macro will only print debug output when started with --debug. 8 * This is important because xautolock (for example) closes stdout/stderr by 9 * default, so just printing something to stdout will lead to the data ending 10 * up on the X11 socket (!). */ 11 #define DEBUG(fmt, ...) \ 12 do { \ 13 if (debug_mode) { \ 14 fprintf(stderr, "[i3lock-debug] " fmt, ##__VA_ARGS__); \ 15 } \ 16 } while (0) 17 18 #endif
