summaryrefslogtreecommitdiffstats
path: root/src/libutil/expression.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-26 15:52:11 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-26 15:52:42 +0100
commit22d602b81fe3315007075f7807bb9d944a72cb94 (patch)
tree1841992bbb7f8457d8c2b07ad2cb6ab57facc523 /src/libutil/expression.c
parentb08a65087f4ec74b6076038d26bf084bb485973c (diff)
downloadrspamd-22d602b81fe3315007075f7807bb9d944a72cb94.tar.gz
rspamd-22d602b81fe3315007075f7807bb9d944a72cb94.zip
[Feature] Use rdtsc where possible
Diffstat (limited to 'src/libutil/expression.c')
-rw-r--r--src/libutil/expression.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/expression.c b/src/libutil/expression.c
index b49935cb4..dae574da5 100644
--- a/src/libutil/expression.c
+++ b/src/libutil/expression.c
@@ -1007,7 +1007,7 @@ rspamd_ast_process_node (struct rspamd_expression *expr, gint flags, GNode *node
*/
if ((expr->evals & 0x1F) == (GPOINTER_TO_UINT (node) >> 4 & 0x1F)) {
calc_ticks = TRUE;
- t1 = rspamd_get_ticks ();
+ t1 = rspamd_get_ticks (TRUE);
}
elt->value = expr->subr->process (data, elt->p.atom);
@@ -1021,7 +1021,7 @@ rspamd_ast_process_node (struct rspamd_expression *expr, gint flags, GNode *node
}
if (calc_ticks) {
- t2 = rspamd_get_ticks ();
+ t2 = rspamd_get_ticks (TRUE);
elt->p.atom->avg_ticks += ((t2 - t1) - elt->p.atom->avg_ticks) /
(expr->evals);
}