The optional argument object limits the considered hap occurrences to a specific object, and index can be used for indexed haps.
The name parameter specifies the hap. If the -all flag is specified, all haps will be used.
When a hap triggers, the frontend object is changed to the object that triggered the hap, unless -s is specified.
If timeout is a positive number, the command will run for at most that many seconds of virtual time.
If timeout-rt is a positive number, the command will run for at most that many seconds of real time.
A time-out will be signaled by throwing a CLI exception, which can be captured using try/except in order to take specific action, or to let it pass unhandled.