|
Lines 319-327
Link Here
|
| 319 |
static int pr, stdoutatty, init = 0; |
319 |
static int pr, stdoutatty, init = 0; |
| 320 |
static struct timeval t0, t_start; |
320 |
static struct timeval t0, t_start; |
| 321 |
static char *s; |
321 |
static char *s; |
|
|
322 |
static u_quad_t lastbc = 0; |
| 322 |
struct timezone tz; |
323 |
struct timezone tz; |
| 323 |
struct timeval t; |
324 |
struct timeval t; |
| 324 |
float d; |
325 |
float d; |
|
|
326 |
float speed; |
| 325 |
|
327 |
|
| 326 |
if (!fs->fs_verbose) |
328 |
if (!fs->fs_verbose) |
| 327 |
return; |
329 |
return; |
|
Lines 377-382
Link Here
|
| 377 |
fprintf (stderr, "\r%s: %2qd%%", s, (long long)(100*bytes/size)); |
379 |
fprintf (stderr, "\r%s: %2qd%%", s, (long long)(100*bytes/size)); |
| 378 |
else |
380 |
else |
| 379 |
fprintf (stderr, "\r%s: %qd Kbytes", s, (long long)(bytes/1024)); |
381 |
fprintf (stderr, "\r%s: %qd Kbytes", s, (long long)(bytes/1024)); |
|
|
382 |
speed = ((float)bytes - (float)lastbc) / 5.0; |
| 383 |
lastbc = bytes; |
| 384 |
if (speed > 1000.0) |
| 385 |
fprintf(stderr, " (%.2f Kbytes/s)", speed / 1000.0); |
| 386 |
else |
| 387 |
fprintf(stderr, " (%.0f bytes/s)", speed); |
| 380 |
} |
388 |
} |
| 381 |
} |
389 |
} |