[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1166 - GNUnet/src/applications/fs/tools
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1166 - GNUnet/src/applications/fs/tools |
Date: |
Thu, 30 Jun 2005 09:27:09 -0700 (PDT) |
Author: grothoff
Date: 2005-06-30 09:27:06 -0700 (Thu, 30 Jun 2005)
New Revision: 1166
Modified:
GNUnet/src/applications/fs/tools/gnunet-insert.c
Log:
better
Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c 2005-06-30 16:21:34 UTC
(rev 1165)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c 2005-06-30 16:27:06 UTC
(rev 1166)
@@ -123,13 +123,31 @@
switch(event->type) {
case FSUI_upload_progress:
if (*verboselevel == YES) {
+ const char * unit = _(/* time unit */ "ms");
+
delta = event->data.UploadProgress.main_eta - cronTime(NULL);
+ if (delta > 5 * 1000) {
+ delta / 1000;
+ unit = _(/* time unit */ "s");
+ if (delta > 5 * 60) {
+ delta / 60;
+ unit = _(/* time unit */ "m");
+ if (delta > 5 * 60) {
+ delta / 60;
+ unit = _(/* time unit */ "h");
+ if (delta > 5 * 24) {
+ delta / 24;
+ unit = _(/* time unit */ " days");
+ }
+ }
+ }
+ }
PRINTF(_("%16llu of %16llu bytes inserted "
- "(estimating %llu seconds to completion) "),
+ "(estimating %llu%s to completion)\n"),
event->data.UploadProgress.main_completed,
event->data.UploadProgress.main_total,
- delta / cronSECONDS);
- printf("\r");
+ delta,
+ unit);
}
break;
case FSUI_upload_complete:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1166 - GNUnet/src/applications/fs/tools,
grothoff <=