stopwatch c# code example
Example 1: stopwatch c#
var timer = new Stopwatch();
timer.Start();
// do stuff
timer.Stop();
}
Example 2: c# stopwatch
private void timer1_Tick(object sender, EventArgs e)
{
TimeSpan duration = DateTime.Now - _start;
label3.Text = duration.ToString(<some format string>);
}