aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/time.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util/time.c b/src/util/time.c
index 6411de662..36a3c8631 100644
--- a/src/util/time.c
+++ b/src/util/time.c
@@ -153,6 +153,23 @@ GNUNET_TIME_absolute_min (struct
153 return (t1.value < t2.value) ? t1 : t2; 153 return (t1.value < t2.value) ? t1 : t2;
154} 154}
155 155
156
157/**
158 * Return the maximum of two relative time values.
159 *
160 * @param t1 first timestamp
161 * @param t2 other timestamp
162 * @return timestamp that is smaller
163 */
164struct GNUNET_TIME_Absolute
165GNUNET_TIME_absolute_max (struct
166 GNUNET_TIME_Absolute
167 t1, struct GNUNET_TIME_Absolute t2)
168{
169 return (t1.value > t2.value) ? t1 : t2;
170}
171
172
156/** 173/**
157 * Given a timestamp in the future, how much time 174 * Given a timestamp in the future, how much time
158 * remains until then? 175 * remains until then?