gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r36487 - in gnunet/src: include util


From: gnunet
Subject: [GNUnet-SVN] r36487 - in gnunet/src: include util
Date: Thu, 8 Oct 2015 18:12:48 +0200

Author: grothoff
Date: 2015-10-08 18:12:48 +0200 (Thu, 08 Oct 2015)
New Revision: 36487

Modified:
   gnunet/src/include/gnunet_time_lib.h
   gnunet/src/util/time.c
Log:
-make time API more intutitive

Modified: gnunet/src/include/gnunet_time_lib.h
===================================================================
--- gnunet/src/include/gnunet_time_lib.h        2015-10-08 12:18:11 UTC (rev 
36486)
+++ gnunet/src/include/gnunet_time_lib.h        2015-10-08 16:12:48 UTC (rev 
36487)
@@ -349,7 +349,7 @@
  * 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);

Modified: gnunet/src/util/time.c
===================================================================
--- gnunet/src/util/time.c      2015-10-08 12:18:11 UTC (rev 36486)
+++ gnunet/src/util/time.c      2015-10-08 16:12:48 UTC (rev 36487)
@@ -309,7 +309,7 @@
  * 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 @@
   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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]