fork(44) download
  1. using System;
  2. using System.Diagnostics;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. // Create new stopwatch
  9. Stopwatch stopwatch = new Stopwatch();
  10.  
  11. // Begin timing
  12. stopwatch.Start();
  13.  
  14. System.Threading.Thread.Sleep(500);
  15.  
  16. // Stop timing
  17. stopwatch.Stop();
  18.  
  19. Console.WriteLine("Time elapsed: {0}", stopwatch.Elapsed);
  20.  
  21.  
  22. }
  23. }
Success #stdin #stdout 0.03s 33944KB
stdin
Standard input is empty
stdout
Time elapsed: 00:00:00.5004372