Response Time Optimization in Wireless Sensor Networks