I need shows the timer running in console. I use stopwatch:
System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
public void startTime()
{
stopwatch.Start();
}
public void GetTime(){
stopwatch.Stop();
TimeSpan timeSpan = stopwatch.Elapsed;
var timeElapsed = (string.Format("\nTime Elapsed: {0} minute(s) {1} second(s)",
timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds / 10 + "\n")).ToString();
}
I need shows in console the timer running normally: 00:00:01, 00:00:02, 00:00:03 … etc
How can I do this?
something like this?