From 9f59db64cc02445b6cc3447b8675d9e938b75f09 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 14 Feb 2010 23:58:31 +0000 Subject: [PATCH] min --- src/util/time.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 return (t1.value < t2.value) ? t1 : t2; } + +/** + * Return the maximum of two relative time values. + * + * @param t1 first timestamp + * @param t2 other timestamp + * @return timestamp that is smaller + */ +struct GNUNET_TIME_Absolute +GNUNET_TIME_absolute_max (struct + GNUNET_TIME_Absolute + t1, struct GNUNET_TIME_Absolute t2) +{ + return (t1.value > t2.value) ? t1 : t2; +} + + /** * Given a timestamp in the future, how much time * remains until then? -- 2.25.1