aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-06 18:09:15 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-06 18:09:15 +0100
commit3f97820a4301e3062561e2a6339c111a208fb4fa (patch)
tree498c870bafc42ffd235882309e996181eb1c2964 /src/libutil/util.h
parent9673734623b8972c86179b2c71ef6d2b353ee07f (diff)
downloadrspamd-3f97820a4301e3062561e2a6339c111a208fb4fa.tar.gz
rspamd-3f97820a4301e3062561e2a6339c111a208fb4fa.zip
[Minor] Use clock_gettime instead of gettimeofday
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 f07d166c5..9f42d6c92 100644
--- a/src/libutil/util.h
+++ b/src/libutil/util.h
@@ -207,6 +207,7 @@ void g_ptr_array_insert (GPtrArray *array, gint index_, gpointer data);
#define tv_to_double(tv) ((double)(tv)->tv_sec + (tv)->tv_usec / 1.0e6)
#define ts_to_usec(ts) ((ts)->tv_sec * 1000000LLU + \
(ts)->tv_nsec / 1000LLU)
+#define ts_to_double(tv) ((double)(tv)->tv_sec + (tv)->tv_nsec / 1.0e9)
/**
* Try to allocate a file on filesystem (using fallocate or posix_fallocate)