Smoothened time estimation with pacifier mkisofs style
This commit is contained in:
parent
4b3144c1e2
commit
49ff3fdbd2
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2008.09.08.121548"
|
#define Xorriso_timestamP "2008.09.09.082406"
|
||||||
|
@ -1210,7 +1210,7 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
|||||||
next_base_count= progress.sector;
|
next_base_count= progress.sector;
|
||||||
}
|
}
|
||||||
if(first_base_time > 0 &&
|
if(first_base_time > 0 &&
|
||||||
current_time - first_base_time >= 3 &&
|
current_time - first_base_time >= 10 &&
|
||||||
progress.sectors > first_base_count) {
|
progress.sectors > first_base_count) {
|
||||||
norm= (1.0 - quot);
|
norm= (1.0 - quot);
|
||||||
if(norm < 0.0001)
|
if(norm < 0.0001)
|
||||||
@ -1224,7 +1224,7 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
|||||||
norm= 1.0;
|
norm= 1.0;
|
||||||
}
|
}
|
||||||
if(base_time > 0 &&
|
if(base_time > 0 &&
|
||||||
current_time - base_time >= 3 && progress.sectors > base_count) {
|
current_time - base_time >= 10 && progress.sectors > base_count) {
|
||||||
quot= ((double) progress.sector - base_count)
|
quot= ((double) progress.sector - base_count)
|
||||||
/ ((double) progress.sectors - base_count);
|
/ ((double) progress.sectors - base_count);
|
||||||
time_prediction+= (1.0 - quot) / quot * (current_time - base_time);
|
time_prediction+= (1.0 - quot) / quot * (current_time - base_time);
|
||||||
@ -1269,6 +1269,8 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
|
|||||||
if(aborting<=0)
|
if(aborting<=0)
|
||||||
aborting= Xorriso_check_burn_abort(xorriso, 0);
|
aborting= Xorriso_check_burn_abort(xorriso, 0);
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
|
if(((time_t) Sfile_microtime(0)) - ((time_t) current_time) >= 1)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(1);
|
return(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user