use setImmediate for real-time throttle switching