Class TStopwatch (unit Stopwch1)

Inherits from

TObject

Really quick and dirty high-res stopwatch using QueryPerformanceCounter. Needs to be spruced up with proper 64-bit arithmetic. Currently only good for one half-hour intervals 03-31-98 GW Revisited and cleaned up a little 05-06-96 GW Original

Constructors


constructor Create;

--------------------------------


Functions

function ElapsedTimems: integer;

function ElapsedTimeSec: Real;

--------------------------------


procedure Reset;

--------------------------------

Properties

Events

Variables

LastElapsedTimems : integer;


msDivider : integer;

Counts per second

NewTimeStamp : TLargeInteger;


PerfCounterFreq : TLargeInteger;


StartTimeStamp : TLargeInteger;

what to divide timestamps by to get ms


Constructors


constructor Create;

--------------------------------


Functions


function ElapsedTimems: integer;

function ElapsedTimeSec: Real;

--------------------------------


procedure Reset;

--------------------------------


Properties


Events


Variables


LastElapsedTimems : integer;


msDivider : integer;

Counts per second


NewTimeStamp : TLargeInteger;


PerfCounterFreq : TLargeInteger;


StartTimeStamp : TLargeInteger;

what to divide timestamps by to get ms