tags:

views:

16

answers:

2

In a GUI application I would like to show a progess dialog displaying how much time left for the task to accomplish, how may I get the remaining time before the task ends and count it down please? thanks

+1  A: 

How to get the remaining time is something no-one but your application (or you) can know.

Frank
@Frank: yes........I mean any idea how to retrieve it?
luna
Probably you have to estimate from information you have: I would guess that e. g. Windows Explorer just projects the expected remaining duration somehow from the number of files and number of bytes to copy, and the number of files and number of bytes already copied and the duration it has taken so far.
Frank
+1  A: 

Assuming you have the code for this GUI application, to determine remaining time you simply need to know the total time a task takes and subtract the amount of time that passed since the start of the task.

Russ