Added a setDispatchInterval function