Embarcadero Delphi Time intervals measurement Using TStopwatch record

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

Recent versions of Delphi ships with the TStopwatch record which is for time interval measurement. Example usage:

uses
  System.Diagnostics;

var
  StopWatch: TStopwatch;
  ElapsedMillseconds: Int64;
begin
  StopWatch := TStopwatch.StartNew;
  // do something that requires measurement
  ElapsedMillseconds := StopWatch.ElapsedMilliseconds;
end;


Got any Embarcadero Delphi Question?