Here is the syntax:
WAITFOR(<statement>) [,TIMEOUT <timeout_value>]
This feature creates a new alternative to polling. For example, you can use WAITFOR to select all the records in a log or a queue table:
WAITFOR (SELECT * FROM myQ)