Answers for "stopwatch format c#"

C#
1

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");
Posted by: Guest on April-17-2022
13

stopwatch c#

var timer = new Stopwatch();

  timer.Start();
  // do stuff
  timer.Stop();
}
Posted by: Guest on August-30-2020

C# Answers by Framework

Browse Popular Code Answers by Language