min
authorChristian Grothoff <christian@grothoff.org>
Sun, 14 Feb 2010 23:58:31 +0000 (23:58 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 14 Feb 2010 23:58:31 +0000 (23:58 +0000)
src/util/time.c

index 6411de662e15cbbd8c6f1ebd5aee46782c6095fc..36a3c8631df2dc1a7bbf1083f7bb4b7991be9a9d 100644 (file)
@@ -153,6 +153,23 @@ GNUNET_TIME_absolute_min (struct
   return (t1.value < t2.value) ? t1 : t2;
 }
 
+
+/**
+ * Return the maximum 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_max (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?