aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'util.h')
-rw-r--r--util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/util.h b/util.h
index 2caf347..f1db6b8 100644
--- a/util.h
+++ b/util.h
@@ -27,6 +27,9 @@
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define LEN(a) (sizeof(a) / sizeof(a[0]))
+#define TV_TO_DOUBLE(x) ((double) ((x).tv_sec) + 0.000001 * \
+ (double) ((x).tv_usec))
+
void* s_malloc(size_t);
void* s_realloc(void*, size_t);