Timing Statements
Timing statements enable you to pause the execution of a thread or obtain information about the system tick counter in your NBC programs. When using the standard NXT firmware NBC implements the wait and waitv statements as thread-specific subroutine calls due to them not being implemented. The enhanced NBC/NXC firmware implements these statements natively. If needed, you can implement simple wait loops using gettick.
add endTick, currTick, waitms Loop: gettick currTick brcmp LT, Loop, currTick, endTick