diff options
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? |