summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'util.h')
-rw-r--r--util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/util.h b/util.h
index f1db6b8..e3cdef9 100644
--- a/util.h
+++ b/util.h
@@ -30,6 +30,11 @@
#define TV_TO_DOUBLE(x) ((double) ((x).tv_sec) + 0.000001 * \
(double) ((x).tv_usec))
+#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
+ (tv)->tv_sec = (ts)->tv_sec; \
+ (tv)->tv_usec = (ts)->tv_nsec / 1000; \
+}
+
void* s_malloc(size_t);
void* s_realloc(void*, size_t);
@@ -38,6 +43,8 @@ void die(const char*, ...);
void size_readable(float*, const char**);
+char* absolute_path(const char*);
+
char* readline(FILE*);
#endif /* UTIL_H */