aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/time.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util/time.c b/src/util/time.c
index b79946269..10e1e6ffa 100644
--- a/src/util/time.c
+++ b/src/util/time.c
@@ -227,21 +227,21 @@ GNUNET_TIME_absolute_get_difference (struct GNUNET_TIME_Absolute start,
227 227
228/** 228/**
229 * Get the duration of an operation as the 229 * Get the duration of an operation as the
230 * difference of the current time and the given start time "hence". 230 * difference of the current time and the given start time "whence".
231 * 231 *
232 * @return aborts if hence==FOREVER, 0 if hence > now, otherwise now-hence. 232 * @return aborts if whence==FOREVER, 0 if whence > now, otherwise now-whence.
233 */ 233 */
234struct GNUNET_TIME_Relative 234struct GNUNET_TIME_Relative
235GNUNET_TIME_absolute_get_duration (struct GNUNET_TIME_Absolute hence) 235GNUNET_TIME_absolute_get_duration (struct GNUNET_TIME_Absolute whence)
236{ 236{
237 struct GNUNET_TIME_Absolute now; 237 struct GNUNET_TIME_Absolute now;
238 struct GNUNET_TIME_Relative ret; 238 struct GNUNET_TIME_Relative ret;
239 239
240 now = GNUNET_TIME_absolute_get (); 240 now = GNUNET_TIME_absolute_get ();
241 GNUNET_assert (hence.abs_value != UINT64_MAX); 241 GNUNET_assert (whence.abs_value != UINT64_MAX);
242 if (hence.abs_value > now.abs_value) 242 if (whence.abs_value > now.abs_value)
243 return GNUNET_TIME_relative_get_zero (); 243 return GNUNET_TIME_relative_get_zero ();
244 ret.rel_value = now.abs_value - hence.abs_value; 244 ret.rel_value = now.abs_value - whence.abs_value;
245 return ret; 245 return ret;
246} 246}
247 247