diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-26 22:58:21 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-26 22:58:30 +0200 |
commit | 28273c70836e834793cfb03b82325e38e566e65a (patch) | |
tree | 40a2e879d907e073a83e18264574f5037f392104 /src/include | |
parent | ccf16c9d0542a04a3fa175305a807d7c0a0a65db (diff) | |
download | gnunet-28273c70836e834793cfb03b82325e38e566e65a.tar.gz gnunet-28273c70836e834793cfb03b82325e38e566e65a.zip |
configurable threshold for randomized backoff
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_time_lib.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index 41840e9a3..c7a06ba23 100644 --- a/src/include/gnunet_time_lib.h +++ b/src/include/gnunet_time_lib.h | |||
@@ -177,13 +177,14 @@ GNUNET_NETWORK_STRUCT_END | |||
177 | /** | 177 | /** |
178 | * Randomized exponential back-off, starting at 1 ms | 178 | * Randomized exponential back-off, starting at 1 ms |
179 | * and going up by a factor of 2+r, where 0 <= r <= 0.5, up | 179 | * and going up by a factor of 2+r, where 0 <= r <= 0.5, up |
180 | * to a maximum of 15 m. | 180 | * to a maximum of the given threshold. |
181 | * | 181 | * |
182 | * @param r current backoff time, initially zero | 182 | * @param rt current backoff time, initially zero |
183 | * @param threshold maximum value for backoff | ||
183 | * @return the next backoff time | 184 | * @return the next backoff time |
184 | */ | 185 | */ |
185 | struct GNUNET_TIME_Relative | 186 | struct GNUNET_TIME_Relative |
186 | GNUNET_TIME_randomized_backoff(struct GNUNET_TIME_Relative rt); | 187 | GNUNET_TIME_randomized_backoff(struct GNUNET_TIME_Relative rt, struct GNUNET_TIME_Relative threshold); |
187 | 188 | ||
188 | 189 | ||
189 | /** | 190 | /** |