diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-06 16:50:35 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-06 16:50:35 +0100 |
commit | 8cbcc5d357fe85895dc3311f0484bbba782f026f (patch) | |
tree | 306a19d9d0ac23502d03253f53afddb9569b47ac /src/libutil/util.h | |
parent | d83a8e52ef07190ff5be8ce1148dba1f8bb75704 (diff) | |
download | rspamd-8cbcc5d357fe85895dc3311f0484bbba782f026f.tar.gz rspamd-8cbcc5d357fe85895dc3311f0484bbba782f026f.zip |
[Feature] Add utility function to return random number from 0 to 1
Diffstat (limited to 'src/libutil/util.h')
-rw-r--r-- | src/libutil/util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h index ec8150fae..48e91cb4f 100644 --- a/src/libutil/util.h +++ b/src/libutil/util.h @@ -410,6 +410,12 @@ guint64 rspamd_hash_seed (void); gdouble rspamd_time_jitter (gdouble in, gdouble jitter); /** + * Return random double in range [0..1) + * @return + */ +gdouble rspamd_random_double (void); + +/** * Constant time version of memcmp */ gboolean rspamd_constant_memcmp (const guchar *a, const guchar *b, gsize len); |