csharp Timer

var startTime = DateTime.Now;

// do stuff

var endTime = DateTime.Now;
var timeSpan = endTime.Subtract(startTime);
Console.WriteLine($"Time taken: {timeSpan.TotalSeconds}");
Times how long "do stuff" takes.

Updated: Friday 16th August 2019, 06:50pm

There are 0 comments

Leave a comment of your own

Comments are currently closed.