aboutsummaryrefslogtreecommitdiff
path: root/src/util/time.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-07-17 10:36:53 +0000
committerChristian Grothoff <christian@grothoff.org>2009-07-17 10:36:53 +0000
commit7bf136782e1fb5bf89780c86596692de625e26a3 (patch)
tree1cd91008e5db1a58cbff6e3cf0f7496d23aea9d6 /src/util/time.c
parent1889ea5dae621980f611b196e3f574c11c2ac881 (diff)
downloadgnunet-7bf136782e1fb5bf89780c86596692de625e26a3.tar.gz
gnunet-7bf136782e1fb5bf89780c86596692de625e26a3.zip
stuff
Diffstat (limited to 'src/util/time.c')
-rw-r--r--src/util/time.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/util/time.c b/src/util/time.c
index c8f408841..95fa89b9a 100644
--- a/src/util/time.c
+++ b/src/util/time.c
@@ -107,6 +107,21 @@ GNUNET_TIME_relative_to_absolute (struct GNUNET_TIME_Relative rel)
107 return ret; 107 return ret;
108} 108}
109 109
110
111/**
112 * Return the minimum of two relative time values.
113 *
114 * @return timestamp that is smaller
115 */
116struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct
117 GNUNET_TIME_Relative
118 t1,
119 struct
120 GNUNET_TIME_Relative t2)
121{
122 return (t1.value < t2.value) ? t1 : t2;
123}
124
110/** 125/**
111 * Given a timestamp in the future, how much time 126 * Given a timestamp in the future, how much time
112 * remains until then? 127 * remains until then?