aboutsummaryrefslogtreecommitdiff
path: root/src/util/time.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-11-14 17:17:36 +0100
committerChristian Grothoff <christian@grothoff.org>2020-11-14 17:17:36 +0100
commitf62e24a88c21235bc3c901508cfb474509ef2961 (patch)
treeee481be9675674d83f54a6c66dee8356ef1dbcbc /src/util/time.c
parent3522008dfd14f049a821dfba7ba89a27aa27d4aa (diff)
downloadgnunet-f62e24a88c21235bc3c901508cfb474509ef2961.tar.gz
gnunet-f62e24a88c21235bc3c901508cfb474509ef2961.zip
spell checking
Diffstat (limited to 'src/util/time.c')
-rw-r--r--src/util/time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/time.c b/src/util/time.c
index a07801922..5205fe11a 100644
--- a/src/util/time.c
+++ b/src/util/time.c
@@ -552,7 +552,7 @@ GNUNET_TIME_calculate_eta (struct GNUNET_TIME_Absolute start,
552 uint64_t finished, 552 uint64_t finished,
553 uint64_t total) 553 uint64_t total)
554{ 554{
555 struct GNUNET_TIME_Relative dur; 555 struct GNUNET_TIME_Relative due;
556 double exp; 556 double exp;
557 struct GNUNET_TIME_Relative ret; 557 struct GNUNET_TIME_Relative ret;
558 558
@@ -561,9 +561,9 @@ GNUNET_TIME_calculate_eta (struct GNUNET_TIME_Absolute start,
561 return GNUNET_TIME_UNIT_ZERO; 561 return GNUNET_TIME_UNIT_ZERO;
562 if (0 == finished) 562 if (0 == finished)
563 return GNUNET_TIME_UNIT_FOREVER_REL; 563 return GNUNET_TIME_UNIT_FOREVER_REL;
564 dur = GNUNET_TIME_absolute_get_duration (start); 564 due = GNUNET_TIME_absolute_get_duration (start);
565 exp = ((double) dur.rel_value_us) * ((double) total) / ((double) finished); 565 exp = ((double) due.rel_value_us) * ((double) total) / ((double) finished);
566 ret.rel_value_us = ((uint64_t) exp) - dur.rel_value_us; 566 ret.rel_value_us = ((uint64_t) exp) - due.rel_value_us;
567 return ret; 567 return ret;
568} 568}
569 569