chiark
/
gitweb
/
~mdw
/
dvdrip
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
276c1df
)
dvd-sector-copy.c (report_progress): Show a throbber to help gauge speed.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 24 Feb 2022 17:01:26 +0000
(17:01 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 24 Feb 2022 17:01:26 +0000
(17:01 +0000)
dvd-sector-copy.c
patch
|
blob
|
blame
|
history
diff --git
a/dvd-sector-copy.c
b/dvd-sector-copy.c
index 3a093360efecf5f9cfa339c4b03326b99b8b2d13..90efce2282bc0227d881546cd9cb1b2968c5e740 100644
(file)
--- a/
dvd-sector-copy.c
+++ b/
dvd-sector-copy.c
@@
-356,6
+356,9
@@
static struct timeval last_time;
static double wsum, wcount;
static struct file *file;
static double wsum, wcount;
static struct file *file;
+static const char throbber[] = "|<-<|>->";
+static unsigned throbix = 0;
+
static void report_progress(secaddr pos)
{
char etastr[32];
static void report_progress(secaddr pos)
{
char etastr[32];
@@
-395,8
+398,9
@@
static void report_progress(secaddr pos)
if (flags&F_ALLPROGRESS) percent = pos*100.0/limit;
else percent = ndone*100.0/nsectors;
print_progress
if (flags&F_ALLPROGRESS) percent = pos*100.0/limit;
else percent = ndone*100.0/nsectors;
print_progress
- ("copied %.1f%% (%"PRIuSEC" of %"PRIuSEC"; %.1f %sB/s, ETA %s)",
- percent, pos, limit, rate, unit, etastr);
+ ("%c copied %.1f%% (%"PRIuSEC" of %"PRIuSEC"; %.1f %sB/s, ETA %s)",
+ throbber[throbix], percent, pos, limit, rate, unit, etastr);
+ throbix++; if (!throbber[throbix]) throbix = 0;
if (file && id_kind(file->id) == VOB) {
append_progress(" -- %s %d %.1f%%",
id_part(file->id) ? "title" : "menu",
if (file && id_kind(file->id) == VOB) {
append_progress(" -- %s %d %.1f%%",
id_part(file->id) ? "title" : "menu",