UNIT Timer;
{$I define.pas}
INTERFACE

{$S- }
function mstime:longint;
procedure msdelay(ms:longint);

IMPLEMENTATION
{$IFDEF WIN32}
uses mmsystem;
function mstime:longint;
begin
  mstime := TimeGetTime;
end;
{$ELSE}
function mstime:longint; external 'MMSYSTEM' name 'TIMEGETTIME';
{$ENDIF}
procedure msdelay(ms:longint);
var t:longint;
begin
  t := mstime + ms;
  while t > mstime do;
end;

END.
