diff options
Diffstat (limited to 'src/util/time.c')
-rw-r--r-- | src/util/time.c | 8 |
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 | ||