Package TimTst2

Uses KbdCRT,Timer

Interface

Sub Handler(W as Word)

Implementation

Ticks as Word

Sub Handler(W as Word)
Static
      OCurPos as Word
Enter
  OCurPos=GetCurPos
  Locate 1,70:PrintD Ticks:ClrEOL
  Ticks+=1
  Locate High(OCurPos)+1,Low(OCurPos)+1
Leave

Touche as Word

Enter
  GetTimerControl(UserSignal)
  Ticks=0
  UserTimerHandler=@Handler
  TimerMutEx=False
  AlWays
    Touche=GetCar
    If Touche<>13 Then PutCar Touche Else PrintCR;
  AWhile
    Touche<>27
  Do;
  RestoreTimerControl
Leave