aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-12 11:49:50 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-12 11:49:50 +0100
commit783f85f3df791a3f948acd9554094d7b352a8d9b (patch)
tree901b35e54eb6096f281fb3f7c1f54f4eb595a9a6 /src/libutil/util.h
parent3b91533451ae4aa258594f604803d383a92eda3d (diff)
downloadrspamd-783f85f3df791a3f948acd9554094d7b352a8d9b.tar.gz
rspamd-783f85f3df791a3f948acd9554094d7b352a8d9b.zip
Handle stats command.
Diffstat (limited to 'src/libutil/util.h')
-rw-r--r--src/libutil/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h
index bf55f901f..f39730b0f 100644
--- a/src/libutil/util.h
+++ b/src/libutil/util.h
@@ -193,6 +193,7 @@ void g_queue_clear (GQueue *queue);
((dbl) - (int)(dbl)) * 1000 * 1000; \
} while (0)
#define tv_to_msec(tv) ((tv)->tv_sec * 1000LLU + (tv)->tv_usec / 1000LLU)
+#define tv_to_double(tv) ((tv)->tv_sec + (tv)->tv_usec / 1e6f)
#define ts_to_usec(ts) ((ts)->tv_sec * 1000000LLU + \
(ts)->tv_nsec / 1000LLU)