From 6e7793d8d8018baeb85fb661e1ee58251b61bf9a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 15 Apr 2019 11:32:51 +0200 Subject: misc work on TNG --- src/include/gnunet_time_lib.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/include') diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index 482ae52d8..d0da267a9 100644 --- a/src/include/gnunet_time_lib.h +++ b/src/include/gnunet_time_lib.h @@ -189,6 +189,16 @@ struct GNUNET_TIME_Relative GNUNET_TIME_randomized_backoff(struct GNUNET_TIME_Relative rt, struct GNUNET_TIME_Relative threshold); +/** + * Return a random time value between 0.5*r and 1.5*r. + * + * @param r input time for scaling + * @return randomized time + */ +struct GNUNET_TIME_Relative +GNUNET_TIME_randomize(struct GNUNET_TIME_Relative r); + + /** * Return relative time of 0ms. */ -- cgit v1.2.3