From: Mark Wooding Date: Mon, 22 Dec 2014 20:32:58 +0000 (+0000) Subject: progs/rspit.c: Update the baton more frequently if we can. X-Git-Tag: 2.2.0~7^2~6 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb/commitdiff_plain/bbde884a30674c7d9e73489bc7f336d5b429e960?ds=inline;hp=--cc progs/rspit.c: Update the baton more frequently if we can. --- bbde884a30674c7d9e73489bc7f336d5b429e960 diff --git a/progs/rspit.c b/progs/rspit.c index 6dd36d61..67913d54 100644 --- a/progs/rspit.c +++ b/progs/rspit.c @@ -1209,7 +1209,7 @@ static int generate(grand *r, mp *outsz, up = 1; if (!outsz) { - if (now - last > 1.0) { + if (now - last > 0.1) { up = 1; } if (up) @@ -1221,7 +1221,7 @@ static int generate(grand *r, mp *outsz, mp_div(&t, 0, t, outsz); assert(!MP_NEGP(t) && MP_CMP(t, <, MP_UINT_MAX)); pc = mp_touint(t); - if (pc > percent || percent > 100 || now - last > 1.0) { + if (pc > percent || percent > 100 || now - last > 0.1) { if (percent > 100) percent = 0; percent &= ~1; @@ -1256,7 +1256,7 @@ static int generate(grand *r, mp *outsz, if (percent > 100) percent = 0; - if (percent < 100) { + if (percent < 100 && up) { putc(*bp++, stderr); putc('\b', stderr); if (!*bp)