SyntaxFix
Write A Post
Hire A Developer
Questions
A better way is to use the Stopwatch class:
using System.Diagnostics; // ... Stopwatch sw = new Stopwatch(); sw.Start(); // ... sw.Stop(); Console.WriteLine("Elapsed={0}",sw.Elapsed);