diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-05-03 20:39:50 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-05-03 20:39:50 +0000 |
commit | e098493e473fcdc4824e9ab05518ffe1460af1e6 (patch) | |
tree | 1a75dfa9b94854dc246c0cd53f3c573912f635ba /src/include/gnunet_time_lib.h | |
parent | 03061fed4e303d20e3027d1864e04578b2ea4cfd (diff) | |
download | gnunet-e098493e473fcdc4824e9ab05518ffe1460af1e6.tar.gz gnunet-e098493e473fcdc4824e9ab05518ffe1460af1e6.zip |
time subtract
Diffstat (limited to 'src/include/gnunet_time_lib.h')
-rw-r--r-- | src/include/gnunet_time_lib.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index b9c2d92f0..aa4e8d5db 100644 --- a/src/include/gnunet_time_lib.h +++ b/src/include/gnunet_time_lib.h | |||
@@ -314,6 +314,22 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_add (struct | |||
314 | GNUNET_TIME_Relative | 314 | GNUNET_TIME_Relative |
315 | duration); | 315 | duration); |
316 | 316 | ||
317 | |||
318 | /** | ||
319 | * Subtract a given relative duration from the | ||
320 | * given start time. | ||
321 | * | ||
322 | * @param start some absolute time | ||
323 | * @param duration some relative time to subtract | ||
324 | * @return ZERO if start <= duration, or FOREVER if start time is FOREVER; start-duration otherwise | ||
325 | */ | ||
326 | struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_subtract (struct | ||
327 | GNUNET_TIME_Absolute | ||
328 | start, | ||
329 | struct | ||
330 | GNUNET_TIME_Relative | ||
331 | duration); | ||
332 | |||
317 | /** | 333 | /** |
318 | * Multiply relative time by a given factor. | 334 | * Multiply relative time by a given factor. |
319 | * | 335 | * |