gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r9072 - in gnunet/src: include util
Date: Fri, 2 Oct 2009 06:54:39 -0600

Author: grothoff
Date: 2009-10-02 06:54:39 -0600 (Fri, 02 Oct 2009)
New Revision: 9072

Modified:
   gnunet/src/include/gnunet_time_lib.h
   gnunet/src/util/time.c
Log:
absmin

Modified: gnunet/src/include/gnunet_time_lib.h
===================================================================
--- gnunet/src/include/gnunet_time_lib.h        2009-10-02 12:52:50 UTC (rev 
9071)
+++ gnunet/src/include/gnunet_time_lib.h        2009-10-02 12:54:39 UTC (rev 
9072)
@@ -205,6 +205,19 @@
                                                      GNUNET_TIME_Relative t2);
 
 /**
+ * Return the minimum of two absolute time values.
+ *
+ * @param t1 first timestamp
+ * @param t2 other timestamp
+ * @return timestamp that is smaller
+ */
+struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min (struct
+                                                     GNUNET_TIME_Absolute
+                                                     t1,
+                                                     struct
+                                                     GNUNET_TIME_Absolute t2);
+
+/**
  * Given a timestamp in the future, how much time
  * remains until then?
  *

Modified: gnunet/src/util/time.c
===================================================================
--- gnunet/src/util/time.c      2009-10-02 12:52:50 UTC (rev 9071)
+++ gnunet/src/util/time.c      2009-10-02 12:54:39 UTC (rev 9072)
@@ -122,6 +122,8 @@
 /**
  * Return the minimum of two relative time values.
  *
+ * @param t1 first timestamp
+ * @param t2 other timestamp
  * @return timestamp that is smaller
  */
 struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct
@@ -133,7 +135,25 @@
   return (t1.value < t2.value) ? t1 : t2;
 }
 
+
+
 /**
+ * Return the minimum of two relative time values.
+ *
+ * @param t1 first timestamp
+ * @param t2 other timestamp
+ * @return timestamp that is smaller
+ */
+struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min (struct
+                                                     GNUNET_TIME_Absolute
+                                                     t1,
+                                                     struct
+                                                     GNUNET_TIME_Absolute t2)
+{
+  return (t1.value < t2.value) ? t1 : t2;
+}
+
+/**
  * Given a timestamp in the future, how much time
  * remains until then?
  *





reply via email to

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