//System.Diagnostics.Stopwatch watcher = new System.Diagnostics.Stopwatch();
//watcher.Start();
System.Diagnostics.Stopwatch watcher = System.Diagnostics.Stopwatch.StartNew();
Thread.Sleep(2500); //do some thing
watcher.Stop();
MessageBox.Show(watcher.Elapsed.TotalMilliseconds.ToString());
MessageBox.Show(watcher.Elapsed.TotalSeconds.ToString());
MessageBox.Show(watcher.Elapsed.TotalMinutes.ToString());
MessageBox.Show(watcher.Elapsed.TotalHours.ToString());
//watcher.Start();
System.Diagnostics.Stopwatch watcher = System.Diagnostics.Stopwatch.StartNew();
Thread.Sleep(2500); //do some thing
watcher.Stop();
MessageBox.Show(watcher.Elapsed.TotalMilliseconds.ToString());
MessageBox.Show(watcher.Elapsed.TotalSeconds.ToString());
MessageBox.Show(watcher.Elapsed.TotalMinutes.ToString());
MessageBox.Show(watcher.Elapsed.TotalHours.ToString());