stopwatch c#

57

stopwatch c# -

  var timer = new Stopwatch();
  timer.Start();

  //B: Run stuff you want timed
  timer.Stop();

  TimeSpan timeTaken = timer.Elapsed;
  string foo = "Time taken: " + timeTaken.ToString(@"m\:ss\.fff"); 

stopwatch c# -

  var timer = new Stopwatch();

  timer.Start();
  // do stuff
  timer.Stop();
}

Comments

Submit
0 Comments