- fix fraction done for uppercase.

fixes #341

svn path=/trunk/boinc_samples/; revision=13171
This commit is contained in:
David Anderson 2007-07-17 17:36:46 +00:00
parent 2d5e4467a4
commit f016c959af
2 changed files with 11 additions and 2 deletions

View File

@ -393,3 +393,10 @@ David 28 June 2007
wrapper/
wrapper.C
David 17 July 2007
- fix fraction done for uppercase.
fixes #341
uppercase/
upper_case.C

View File

@ -192,7 +192,9 @@ void worker() {
boinc_checkpoint_completed();
}
boinc_fraction_done(nchars/fsize);
double f = nchars/fsize;
if (cpu_time) f /= 2;
boinc_fraction_done(f);
}
retval = out.flush();
@ -208,7 +210,7 @@ void worker() {
while (1) {
double e = dtime()-start;
if (e > cpu_time) break;
boinc_fraction_done(e/cpu_time);
boinc_fraction_done(.5 + e/(cpu_time*2));
if (boinc_time_to_checkpoint()) {
retval = do_checkpoint(out, nchars);