aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-19 10:53:22 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-12-19 10:53:22 +0000
commit918031c506cd7e229578fdcb11c0289938205813 (patch)
tree0e04b6f771a7a7c7cc891721dc6d1313622a4194 /src/libutil/util.h
parent47be073a75cc317ebafceaab85bde1009ff93fbc (diff)
downloadrspamd-918031c506cd7e229578fdcb11c0289938205813.tar.gz
rspamd-918031c506cd7e229578fdcb11c0289938205813.zip
Measure time for shingles generation.
Diffstat (limited to 'src/libutil/util.h')
-rw-r--r--src/libutil/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h
index de723ecd3..bd2d069a1 100644
--- a/src/libutil/util.h
+++ b/src/libutil/util.h
@@ -244,6 +244,8 @@ gsize rspamd_strlcpy_tolower (gchar *dst, const gchar *src, gsize siz);
((dbl) - (int)(dbl)) * 1000 * 1000; \
} while (0)
#define tv_to_msec(tv) ((tv)->tv_sec * 1000LLU + (tv)->tv_usec / 1000LLU)
+#define ts_to_usec(ts) ((ts)->tv_sec * 1000000LLU + \
+ (ts)->tv_nsec / 1000LLU)
/* Compare two emails for building emails tree */
gint rspamd_emails_cmp (gconstpointer a, gconstpointer b);