An apparatus (10) includes a body (110), a shaft (200) extending distally from the body, a motor (160), a stapling assembly (300) disposed at a distal end of the shaft, and a timer circuit operatively coupled to the motor and the firing actuator (150). The body includes a firing actuator and the motor is configured to activate in response to a firing actuation of the firing actuator. The motor is further configured to deactivate after a first predetermined time period subsequent to the firing actuation. The stapling assembly is configured to selectively move from an open position to a closed position to clamp tissue and is operable to drive a plurality of staples (90) into the clamped tissue in response to activation of the motor. The timer circuit is configured to activate a timer in response to the firing actuation. The timer is configured to run for a second predetermined time period. The timer circuit is configured to ensure deactivation of the motor upon expiration of the second predetermined time period.