Network-adaptive management of computation energy in wireless sensor networks