-make time API more intutitive
authorChristian Grothoff <christian@grothoff.org>
Thu, 8 Oct 2015 16:12:48 +0000 (16:12 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 8 Oct 2015 16:12:48 +0000 (16:12 +0000)
src/include/gnunet_time_lib.h
src/util/time.c

index b4b58f40cf7c95636cc75b393c4074f3b1119bfd..c4e771eebccf0861b64af439b6a897a3a96e0dad 100644 (file)
@@ -349,7 +349,7 @@ GNUNET_TIME_absolute_get_difference (struct GNUNET_TIME_Absolute start,
  * difference of the current time and the given start time "hence".
  *
  * @param whence some absolute time, typically in the past
- * @return aborts if hence==FOREVER, 0 if hence > now, otherwise now-hence.
+ * @return 0 if hence > now, otherwise now-hence.
  */
 struct GNUNET_TIME_Relative
 GNUNET_TIME_absolute_get_duration (struct GNUNET_TIME_Absolute whence);
index baf7ee67db75e476a546ffc6544333375cb89ae6..ba849e26597be099aacaad692b36465bf9db8957 100644 (file)
@@ -309,7 +309,7 @@ GNUNET_TIME_absolute_get_difference (struct GNUNET_TIME_Absolute start,
  * Get the duration of an operation as the
  * difference of the current time and the given start time "whence".
  *
- * @return aborts if whence==FOREVER, 0 if whence > now, otherwise now-whence.
+ * @return 0 if whence > now, otherwise now-whence.
  */
 struct GNUNET_TIME_Relative
 GNUNET_TIME_absolute_get_duration (struct GNUNET_TIME_Absolute whence)
@@ -318,7 +318,6 @@ GNUNET_TIME_absolute_get_duration (struct GNUNET_TIME_Absolute whence)
   struct GNUNET_TIME_Relative ret;
 
   now = GNUNET_TIME_absolute_get ();
-  GNUNET_assert (whence.abs_value_us != UINT64_MAX);
   if (whence.abs_value_us > now.abs_value_us)
     return GNUNET_TIME_UNIT_ZERO;
   ret.rel_value_us = now.abs_value_us - whence.abs_value_us;