aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.c b/main.c
index 64710f2..10f7440 100644
--- a/main.c
+++ b/main.c
@@ -23,6 +23,8 @@
#include "config.h"
#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
@@ -33,12 +35,20 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <time.h>
+#include <sys/time.h>
#include <X11/keysym.h>
#include <X11/XF86keysym.h>
#define MODMASK(mask) ((mask) & USED_MODMASK)
#define BAR_SEP " "
+#define TV_DIFF(t1,t2) (((t1)->tv_sec - (t2)->tv_sec ) * 1000 + \
+ ((t1)->tv_usec - (t2)->tv_usec) / 1000)
+#define TV_ADD_MSEC(tv,t) { \
+ (tv)->tv_sec += (t) / 1000; \
+ (tv)->tv_usec += (t) % 1000 * 1000; \
+}
+
typedef struct {
struct timeval when;
bool active;