diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-03-10 10:55:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-03-10 10:55:01 +0000 |
commit | f6c1d5c870dadddc88c8f501448e2951b1c900b7 (patch) | |
tree | bf40faddf1ca8d96ab8fc2840507ef025a87c4f5 /src/include/gnunet_time_lib.h | |
parent | 02e738b91dff93aa75bfe38d5d58fdbd353f50be (diff) | |
download | gnunet-f6c1d5c870dadddc88c8f501448e2951b1c900b7.tar.gz gnunet-f6c1d5c870dadddc88c8f501448e2951b1c900b7.zip |
keepalive PINGs
Diffstat (limited to 'src/include/gnunet_time_lib.h')
-rw-r--r-- | src/include/gnunet_time_lib.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index 8336a04fd..fa443a463 100644 --- a/src/include/gnunet_time_lib.h +++ b/src/include/gnunet_time_lib.h | |||
@@ -204,6 +204,20 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct | |||
204 | struct | 204 | struct |
205 | GNUNET_TIME_Relative t2); | 205 | GNUNET_TIME_Relative t2); |
206 | 206 | ||
207 | |||
208 | /** | ||
209 | * Return the maximum of two relative time values. | ||
210 | * | ||
211 | * @param t1 first timestamp | ||
212 | * @param t2 other timestamp | ||
213 | * @return timestamp that is larger | ||
214 | */ | ||
215 | struct GNUNET_TIME_Relative GNUNET_TIME_relative_max (struct | ||
216 | GNUNET_TIME_Relative | ||
217 | t1, | ||
218 | struct | ||
219 | GNUNET_TIME_Relative t2); | ||
220 | |||
207 | /** | 221 | /** |
208 | * Return the minimum of two absolute time values. | 222 | * Return the minimum of two absolute time values. |
209 | * | 223 | * |
@@ -314,6 +328,19 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply (struct | |||
314 | factor); | 328 | factor); |
315 | 329 | ||
316 | /** | 330 | /** |
331 | * Divide relative time by a given factor. | ||
332 | * | ||
333 | * @param rel some duration | ||
334 | * @param factor integer to divide by | ||
335 | * @return FOREVER if rel=FOREVER or factor==0; otherwise rel/factor | ||
336 | */ | ||
337 | struct GNUNET_TIME_Relative GNUNET_TIME_relative_divide (struct | ||
338 | GNUNET_TIME_Relative | ||
339 | rel, | ||
340 | unsigned int | ||
341 | factor); | ||
342 | |||
343 | /** | ||
317 | * Add relative times together. | 344 | * Add relative times together. |
318 | * | 345 | * |
319 | * @param a1 some relative time | 346 | * @param a1 some relative time |