aboutsummaryrefslogtreecommitdiff
path: root/src/util/time.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-02-14 23:58:31 +0000
committerChristian Grothoff <christian@grothoff.org>2010-02-14 23:58:31 +0000
commit9f59db64cc02445b6cc3447b8675d9e938b75f09 (patch)
treedce1c3e9dbdadb3e95dd737e2329bd164a9f38b3 /src/util/time.c
parentc1133577206e196ff90db06693cedc6ba816b20e (diff)
downloadgnunet-9f59db64cc02445b6cc3447b8675d9e938b75f09.tar.gz
gnunet-9f59db64cc02445b6cc3447b8675d9e938b75f09.zip
min
Diffstat (limited to 'src/util/time.c')
-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?