how to find remaining time in C# ?

  • Thread starter Thread starter Darth
  • Start date Start date
D

Darth

Hi,


I am running lame to convert a wav file to mp3 file and I want to
display to the user how much time is left. How do I do that in C# ??

System.Diagnostics.Process lame =
System.Diagnostics.Process.Start(lame_path,lame_args);
lame.WaitForExit();

TIA,
Darth
 
Unless the process gives you some indication, you are pretty much stuck with
winging it. In general, most wrapped process give little feedback while
running, so you are probably stuck with winging it. :-)

One method is to see how many bytes have been written to disk, but this will
just be an estimate. It will only be as good as your algorithm that
calculates the rough difference in size between formats.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
 
Back
Top