diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-08-29 20:26:36 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-08-29 20:26:36 +0000 |
commit | 61b1c378568bbf7ca7cb1a51d2f1920d5d36fd26 (patch) | |
tree | 443822505cde9ff0288f0f995b5afcb804e5198a /src/include/gnunet_time_lib.h | |
parent | 987d988f588eae28c8c97c651cdd7cc0d81159c8 (diff) | |
download | gnunet-61b1c378568bbf7ca7cb1a51d2f1920d5d36fd26.tar.gz gnunet-61b1c378568bbf7ca7cb1a51d2f1920d5d36fd26.zip |
eta
Diffstat (limited to 'src/include/gnunet_time_lib.h')
-rw-r--r-- | src/include/gnunet_time_lib.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index b5da09cd8..e4b9dd970 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 | |||
163 | GNUNET_TIME_Absolute | 163 | GNUNET_TIME_Absolute |
164 | future); | 164 | future); |
165 | 165 | ||
166 | |||
167 | /** | ||
168 | * Calculate the estimate time of arrival/completion | ||
169 | * for an operation. | ||
170 | * | ||
171 | * @param start when did the operation start? | ||
172 | * @param finished how much has been done? | ||
173 | * @param total how much must be done overall (same unit as for "finished") | ||
174 | * @return remaining duration for the operation, | ||
175 | * assuming it continues at the same speed | ||
176 | */ | ||
177 | struct GNUNET_TIME_Relative GNUNET_TIME_calculate_eta (struct GNUNET_TIME_Absolute start, | ||
178 | uint64_t finished, | ||
179 | uint64_t total); | ||
180 | |||
181 | |||
166 | /** | 182 | /** |
167 | * Compute the time difference between the given start and end times. | 183 | * Compute the time difference between the given start and end times. |
168 | * Use this function instead of actual subtraction to ensure that | 184 | * Use this function instead of actual subtraction to ensure that |