TimeCount

ちょっとしたベンチマークを取りたいときに便利かもしれないユニット。

unit TimeCount;

interface

uses
  Windows, SysUtils, Dialogs, MMSystem;

  procedure StartCount;
  function EndCount: Cardinal;
  procedure EndCountWithPrint;

implementation

var
  Count: Cardinal;

  procedure StartCount;
  begin
    Count := timeGetTime;
  end;

  function EndCount: Cardinal;
  begin
    Result := timeGetTime - Count;
  end;

  procedure EndCountWithPrint;
  begin
    ShowMessage(Format('%d ms', [timeGetTime - Count]));
  end;

end.

Return index page