C# I need to show the time running while the process is doing, shows the seconds increasing, normally: 00:00:01, 00:00:02, 00:00:03..... etc.
I'm using this code:
var stopwatch = new System.Diagnostics.Stopwatch();
stopwatch.Start();
//here is doing my process
stopwatch.Stop();
when the process stop, I show the time ELAPSED, with this:
TimeSpan ts = stopwatch.Elapsed;
...and this:
{0} minute(s)"+ " {1} second(s)", ts.Minutes, ts.Seconds, ts.Milliseconds/10.
this show the total time elapsed, But I need show the time running in console.
How can I do this?