unit WinTimer;
interface

function mstime:LongInt;{current time in miliseconds from program start}
procedure msdelay(ms:longint);

implementation

function TimeGetTime:Longint; far; external 'MMSYSTEM' name 'TIMEGETTIME';

var ProgramStartTime:longint;

function mstime:LongInt;
begin
  mstime := TimeGetTime - ProgramStartTime;
end;

procedure msdelay(ms:longint);
var i:longint;
begin
  i := mstime + ms;
  while mstime < i do begin
  end;
end;

begin
  ProgramStartTime := mstime;
end.
