function ElapsedTimeInSecs(ET : EventTimer) : DWORD;
Returns the elapsed time, in seconds, for this timer.
This routine returns the same result as ElapsedTime, but converted to seconds. Partial seconds are truncated.
The following example shows how to use an EventTimer within a simple console application. Async Professional CLX uses timers internally, without direct connection to the user interface.
The following example displays the elapsed time until a key is pressed or 20 seconds have elapsed:
var
ET : EventTimer;
begin
WriteLn('You have 20 seconds to press a key:');
NewTimerSecs(ET, 20);
repeat
Write(^M, ElapsedTimeInSecs(ET));
until KeyPressed or TimerExpired(ET);
WriteLn;
if not KeyPressed then WriteLn('Time is up.');
end.
See also: ElapsedTime, NewTimer