aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_time_lib.h
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2009-08-29 20:26:36 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2009-08-29 20:26:36 +0000
commit52b13f8d47e8b0405cf10326ce4e8d517a6042e1 (patch)
tree443822505cde9ff0288f0f995b5afcb804e5198a /src/include/gnunet_time_lib.h
parent560deba1c13a98c6bbae20e3db8b2553c2cf5f70 (diff)
eta
git-svn-id: https://gnunet.org/svn/gnunet@8887 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/include/gnunet_time_lib.h')
-rw-r--r--src/include/gnunet_time_lib.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h
index b5da09cd83..e4b9dd9706 100644
--- a/src/include/gnunet_time_lib.h
+++ b/src/include/gnunet_time_lib.h
@@ -163,6 +163,22 @@ struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_remaining (struct
GNUNET_TIME_Absolute
future);
+
+/**
+ * Calculate the estimate time of arrival/completion
+ * for an operation.
+ *
+ * @param start when did the operation start?
+ * @param finished how much has been done?
+ * @param total how much must be done overall (same unit as for "finished")
+ * @return remaining duration for the operation,
+ * assuming it continues at the same speed
+ */
+struct GNUNET_TIME_Relative GNUNET_TIME_calculate_eta (struct GNUNET_TIME_Absolute start,
+ uint64_t finished,
+ uint64_t total);
+
+
/**
* Compute the time difference between the given start and end times.
* Use this function instead of actual subtraction to ensure that