The
TimeSpan
constructor you're calling expects the number of
ticks, but you are passing the number of
milliseconds.
TimeSpan Constructor (System) | Microsoft Docs[
^]
One tick is 100 nanoseconds. There are 10,000 ticks in a millisecond. With two decimal places for your fractional seconds, you would need to run for 100 seconds to see any value in your output.
To get the correct output, use
TimeSpan.FromMilliseconds
instead:
TimeSpan trvani = TimeSpan.FromMilliseconds(mt.ElapsedMilliseconds);
TimeSpan.FromMilliseconds(Double) Method (System) | Microsoft Docs[
^]