2012-03-26 13:54:47 -04:00
|
|
|
#ifndef _I3LOCK_H
|
|
|
|
#define _I3LOCK_H
|
|
|
|
|
2017-12-08 02:29:05 -05:00
|
|
|
// boy i sure hope this doesnt change in the future
|
|
|
|
#define NANOSECONDS_IN_SECOND 1000000000
|
|
|
|
|
2012-03-26 13:54:47 -04:00
|
|
|
/* This macro will only print debug output when started with --debug.
|
|
|
|
* This is important because xautolock (for example) closes stdout/stderr by
|
|
|
|
* default, so just printing something to stdout will lead to the data ending
|
|
|
|
* up on the X11 socket (!). */
|
2020-07-18 21:59:04 -04:00
|
|
|
#define DEBUG(fmt, ...) \
|
|
|
|
do { \
|
|
|
|
if (debug_mode) { \
|
|
|
|
fprintf(stderr, "[i3lock-debug] " fmt, ##__VA_ARGS__); \
|
|
|
|
} \
|
2015-03-16 13:47:16 -04:00
|
|
|
} while (0)
|
2012-03-26 13:54:47 -04:00
|
|
|
|
|
|
|
#endif
|