The timer in my opinion is not very accurate when it displays time from its _Tick()
Method. I am wanting to show elapsed time in minutes/seconds show the length of time a procedure takes to complete. I have used this with the Timer but have discovered it's calculations are incorrect. Which is why I wanted to ask would a StopWatch be better to show more accurately or is their a separate control that I should be using altogether?
private int timepassed = 0;
private void buttonFourteen_Click(object sender, DragEventArgs e)
{
timer2.Start();
var backgroundWorker = new BackgroundWorker();
backgroundWorker.DoWork += (s, e) =>
{
//Lengthy Procedure Goes Here
};
backgroundWorker.RunWorkerCompleted += (s, e) =>
{
timer2.Stop();
};
backgroundWorker.RunWorkerAsync();
}
private void timer2_Tick(object sender, EventArgs e)
{
timepassed++;
timedisplay.Text = timepassed.ToString();
}