summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-09-02 04:33:44 +0200
committerBert <ber.t@gmx.com>2011-09-02 04:33:44 +0200
commit1e84773276ede56309a145dc08a4f3d47ad3a29f (patch)
tree44dcbcaa8ae2248e089b74abadce86da1a547a6f /util.h
parent391e6e707968a8ee74e88b5e19ba90e799572c93 (diff)
downloadnsxiv-1e84773276ede56309a145dc08a4f3d47ad3a29f.tar.zst
Data driven timeout handling
Diffstat (limited to 'util.h')
-rw-r--r--util.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/util.h b/util.h
index a891054..19ebcd7 100644
--- a/util.h
+++ b/util.h
@@ -33,7 +33,12 @@
#define MSEC_TO_TIMEVAL(t,tv) { \
(tv)->tv_sec = (t) / 1000; \
- (tv)->tv_usec = (t) % 1000 * 1000; \
+ (tv)->tv_usec = (t) % 1000 * 1000; \
+}
+
+#define MSEC_ADD_TO_TIMEVAL(t,tv) { \
+ (tv)->tv_sec += (t) / 1000; \
+ (tv)->tv_usec += (t) % 1000 * 1000; \
}
#ifndef TIMESPEC_TO_TIMEVAL
@@ -60,8 +65,6 @@ char* s_strdup(char*);
void warn(const char*, ...);
void die(const char*, ...);
-int min_int_nz(int, ...);
-
void size_readable(float*, const char**);
char* absolute_path(const char*);