summaryrefslogtreecommitdiffstats
path: root/src/phnc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/phnc.c')
-rw-r--r--src/phnc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/phnc.c b/src/phnc.c
index 8ac4e9c..2f6334c 100644
--- a/src/phnc.c
+++ b/src/phnc.c
@@ -130,10 +130,11 @@ pstatus_t photorec_progressbar(WINDOW *window, const unsigned int pass, const st
(unsigned)(elapsed_time%60));
if(offset > partition->part_offset && params->status!=STATUS_EXT2_ON_BF && params->status!=STATUS_EXT2_OFF_BF)
{
+ const time_t eta=(partition->part_offset+partition->part_size-1-offset)*elapsed_time/(offset-partition->part_offset);
wprintw(window," - Estimated time to completion %uh%02um%02u\n",
- (unsigned)((partition->part_offset+partition->part_size-1-offset)*elapsed_time/(offset-partition->part_offset)/3600),
- (unsigned)(((partition->part_offset+partition->part_size-1-offset)*elapsed_time/(offset-partition->part_offset)/60)%60),
- (unsigned)((partition->part_offset+partition->part_size-1-offset)*elapsed_time/(offset-partition->part_offset))%60);
+ (unsigned)(eta/3600),
+ (unsigned)((eta/60)%60),
+ (unsigned)(eta%60));
}
}
photorec_info(window, params->file_stats);