nicer
[oweals/gnunet.git] / src / util / strings.c
index d53bcd4826d43f43c31c46e3a37af33737993509..b2804782b222d9e8b269521149bd7866863a7f67 100644 (file)
@@ -363,6 +363,8 @@ GNUNET_STRINGS_relative_time_to_string (struct GNUNET_TIME_Relative delta)
   char *ret;
   uint64_t dval = delta.value;
 
+  if (delta.value == GNUNET_TIME_UNIT_FOREVER_REL.value)
+    return GNUNET_strdup (_("forever"));
   if (dval > 5 * 1000)
     {
       dval = dval / 1000;
@@ -401,6 +403,8 @@ GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t)
   time_t tt;
   char *ret;
 
+  if (t.value == GNUNET_TIME_UNIT_FOREVER_ABS.value)
+    return GNUNET_strdup (_("end of time"));
   tt = t.value / 1000;
 #ifdef ctime_r
   ret = ctime_r (&tt, GNUNET_malloc (32));