Network-Adaptive Management of Computation Energy in Wireless Sensor Networks