diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-07-17 10:36:53 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-07-17 10:36:53 +0000 |
commit | 7bf136782e1fb5bf89780c86596692de625e26a3 (patch) | |
tree | 1cd91008e5db1a58cbff6e3cf0f7496d23aea9d6 /src/util/time.c | |
parent | 1889ea5dae621980f611b196e3f574c11c2ac881 (diff) | |
download | gnunet-7bf136782e1fb5bf89780c86596692de625e26a3.tar.gz gnunet-7bf136782e1fb5bf89780c86596692de625e26a3.zip |
stuff
Diffstat (limited to 'src/util/time.c')
-rw-r--r-- | src/util/time.c | 15 |
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 | */ | ||
116 | struct 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? |