Announcement

Collapse
No announcement yet.

How does the system timer work?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How does the system timer work?

    I want my display to check for serial input for exactly 32 ms during a loop. Is there a system timer in 4DGL that I can use for this? How would I complete my code? Thanks

    repeat
    while((char := serin()) < 0);
    if(char == 'A')
    B
    endif
    until...?

  • #2


    *TIMER0 := 32 ; // set timer to time 32ms


    i := *TIMER0 ; // will return number of ms left til 32ms have elapsed in i
    Mark

    Comment


    • #3


      Success!! Thanks

      Comment

      Working...
      X