I need to show also the minutes, actually I use this code for show the seconds, but also need the minutes
TimeSpan ts = stopwatch.Elapsed;
Console.WriteLine(\"F
I've coded this way:
using System.Diagnostics;
...
Stopwatch watch = new Stopwatch();
watch.Start();
// here the complex program.
...
watch.Stop();
TimeSpan timeSpan = watch.Elapsed;
Console.WriteLine("Time: {0}h {1}m {2}s {3}ms", timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds);