mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 14:10:47 +02:00
+ implemented crt.delay() for win16
git-svn-id: trunk@37643 -
This commit is contained in:
parent
b6efaeb8fd
commit
ac82fc3072
@ -27,7 +27,7 @@ Var
|
||||
implementation
|
||||
|
||||
uses
|
||||
video, keyboard;
|
||||
video, keyboard, WinProcs, WinTypes;
|
||||
|
||||
{****************************************************************************
|
||||
Low level Routines
|
||||
@ -287,7 +287,18 @@ end;
|
||||
*************************************************************************}
|
||||
|
||||
procedure Delay(MS: Word);
|
||||
var
|
||||
ticks: LongInt;
|
||||
m: MSG;
|
||||
begin
|
||||
ticks:=GetTickCount;
|
||||
repeat
|
||||
if PeekMessage(FarAddr(m),0,0,0,1) then
|
||||
begin
|
||||
TranslateMessage(FarAddr(m));
|
||||
DispatchMessage(FarAddr(m));
|
||||
end;
|
||||
until (GetTickCount-ticks)>=MS;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user