aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-06 19:52:10 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-06 19:52:10 +0000
commite2bd3276c59e502e19e4c8a4469ff8d8f2e2c202 (patch)
tree822c439991c7bccbb05e16456d4c6f8f3e1b9118 /src/util
parent60c30bd7b1380d28b27dd7e2180ae0b19e33008a (diff)
downloadgnunet-e2bd3276c59e502e19e4c8a4469ff8d8f2e2c202.tar.gz
gnunet-e2bd3276c59e502e19e4c8a4469ff8d8f2e2c202.zip
-better output for 0 delay
Diffstat (limited to 'src/util')
-rw-r--r--src/util/strings.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/strings.c b/src/util/strings.c
index 085367f15..47ef6c1f9 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -631,8 +631,10 @@ GNUNET_STRINGS_relative_time_to_string (struct GNUNET_TIME_Relative delta,
631 const char *unit = _( /* time unit */ "ms"); 631 const char *unit = _( /* time unit */ "ms");
632 uint64_t dval = delta.rel_value; 632 uint64_t dval = delta.rel_value;
633 633
634 if (delta.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value) 634 if (GNUNET_TIME_UNIT_FOREVER_REL.rel_value == delta.rel_value)
635 return _("forever"); 635 return _("forever");
636 if (0 == delta.rel_value)
637 return _("0 ms");
636 if ( ( (GNUNET_YES == do_round) && 638 if ( ( (GNUNET_YES == do_round) &&
637 (dval > 5 * 1000) ) || 639 (dval > 5 * 1000) ) ||
638 (0 == (dval % 1000) )) 640 (0 == (dval % 1000) ))