FreeBSD Bugzilla – Attachment 5927 Details for
Bug 13758
[PATCH] adding current download throughput output to fetch(1)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 995 bytes, created by
adrian
on 1999-09-15 14:30:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
adrian
Created:
1999-09-15 14:30:00 UTC
Size:
995 bytes
patch
obsolete
>Index: fetch/main.c >=================================================================== >RCS file: /home/ncvs/src/usr.bin/fetch/main.c,v >retrieving revision 1.53 >diff -u -r1.53 main.c >--- main.c 1999/08/28 01:00:51 1.53 >+++ main.c 1999/09/15 12:40:42 >@@ -319,9 +319,11 @@ > static int pr, stdoutatty, init = 0; > static struct timeval t0, t_start; > static char *s; >+ static u_quad_t lastbc = 0; > struct timezone tz; > struct timeval t; > float d; >+ float speed; > > if (!fs->fs_verbose) > return; >@@ -377,6 +379,12 @@ > fprintf (stderr, "\r%s: %2qd%%", s, (long long)(100*bytes/size)); > else > fprintf (stderr, "\r%s: %qd Kbytes", s, (long long)(bytes/1024)); >+ speed = ((float)bytes - (float)lastbc) / 5.0; >+ lastbc = bytes; >+ if (speed > 1000.0) >+ fprintf(stderr, " (%.2f Kbytes/s)", speed / 1000.0); >+ else >+ fprintf(stderr, " (%.0f bytes/s)", speed); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 13758
: 5927