projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c113357
)
min
author
Christian Grothoff
<christian@grothoff.org>
Sun, 14 Feb 2010 23:58:31 +0000
(23:58 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Sun, 14 Feb 2010 23:58:31 +0000
(23:58 +0000)
src/util/time.c
patch
|
blob
|
history
diff --git
a/src/util/time.c
b/src/util/time.c
index 6411de662e15cbbd8c6f1ebd5aee46782c6095fc..36a3c8631df2dc1a7bbf1083f7bb4b7991be9a9d 100644
(file)
--- 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?