From 16f6de937e91a562523a04e6fd646c58d7845410 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 9 Sep 2008 08:25:20 +0000 Subject: [PATCH] Smoothened time estimation with pacifier mkisofs style --- xorriso/xorriso_timestamp.h | 2 +- xorriso/xorrisoburn.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 7d0b4ce4..feb102b1 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.09.08.121548" +#define Xorriso_timestamP "2008.09.09.082406" diff --git a/xorriso/xorrisoburn.c b/xorriso/xorrisoburn.c index 9e8e072c..e751e097 100644 --- a/xorriso/xorrisoburn.c +++ b/xorriso/xorrisoburn.c @@ -1210,7 +1210,7 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive, next_base_count= progress.sector; } if(first_base_time > 0 && - current_time - first_base_time >= 3 && + current_time - first_base_time >= 10 && progress.sectors > first_base_count) { norm= (1.0 - quot); if(norm < 0.0001) @@ -1224,7 +1224,7 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive, norm= 1.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) / ((double) progress.sectors - base_count); 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) aborting= Xorriso_check_burn_abort(xorriso, 0); usleep(100000); + if(((time_t) Sfile_microtime(0)) - ((time_t) current_time) >= 1) + break; } } return(1);