How to wait on a clocking block signal with timeout functionality

In reply to Juhi_Patel:

Hey Juhi,
rather than assigning value to B, you can also wait for A==15 in fork and that would work fine right. just trying to use less variables and always code block.
thanks