procedure NewTimer(var ET : EventTimer; mSecs : DWORD);
Initializes a timer that will expire in the specified number of milliseconds.
This routine initializes an EventTimer record, which is used to measure elapsed time or to schedule an event. NewTimer does two things: it stores the current time in the StartMS field of ET, and it calculates what the time will be when mSecs number of milliseconds expire and stores that value in ExpireMS.
The following example initializes a timer and then loops until the timer expires in 20 seconds:
var
ET : EventTimer;
...
NewTimer(ET, 20*1000);
repeat
...
until TimerExpired(ET);
See also: ElapsedTime, NewTimerSecs, RemainingTime, TimerExpired