1. A method comprising: generating a rule set specifying how an application running on a primary processor handles events; sending the rule set from the primary processor to a secondary processor; placing the primary processor into sleep mode; and handling, by the secondary processor, at least one event corresponding to the application by executing the rule set while the primary processor is in sleep mode.