There are no inbuilt blocks to directly compare and check the times but you have few options to achieve what you want using existing block depending on the exact requirements.
Option 1: Use Cron Timer block
You can use Gate block along with couple of Cron Timer blocks to enable/disable the gate block. You pass the measurement values through the Gate block, so rest of the model will execute only when Gate block is open. This will allow you to compare measurement values only when Gate block is open and generate alarms if required. See the following example model.
One issue with this approach is that model need to be activated before the 8 PM otherwise gate block will remain closed until next 8 PM next day.
Option 2: Use Text Substitution block
As I mentioned earlier that Analytics Builder does not have any block to compare time or extract hour/minutes from a time but it has Text Substitution block which can generate format timestamp of measurements into string format “1970-08-12T02:00:37.000+05:30”. We can then use couple of Expression block to extract the hour and minutes from the time string. Then we can use another Expression block to check if the time is within the desired period. We can combine it again with the Gate block to enable/disable rest of the model which calculates delta and generate alarms. See the following example model.
Option 3: Use custom block
Another option would be write a custom block which can check directly check if the time is within the desired time period and use it with the Gate block like above. A custom block can be implemented using the block-sdk - GitHub - SoftwareAG/apama-analytics-builder-block-sdk: Apama Analytics Builder Block SDK