Hi folks, sure enough some of you know how to do this.
I'd like to display the time that a process has taken, how can I do that? The idea is to run a process by clicking on a button and when the process is finished, I would display something like: Total process time: :red hh:mm:ss
Thanks in advance,
- cfz
Hi again, friends.
I can't believe nobody knows this.
Perhaps I didn't make myself clear.
Is there any API I can call when the button is pressed that returns the time and then call it again when the process is finished and then somehow substract both times to have the elapsed time? This could be a possible solution, but I don't know how to do it...
Can anybody help me?
Thanks again,
-cfz
What do you mean by process? If it's thread or (CreateDialogBoxParam), then your "get/subtract theory" won't work, you'll need to wait for it to be over using WaitForSingleObject maybe. If it's DialogBoxParam or a long bunch of code (not asynchronous ) the following API may help: GetTickCount, QueryPerformanceCounter
See how I didn't explain it well :-)?
Thanks for your reply, ramguru
What I meant by process is just a series of calculations. It's an invoke to a proc defined in the .code section that will finish after a number of iterations. And I just want to display the time that it took.
I'll check GetTickCount out, then...
-cfz