Maximizing the aggregate network utility and minimizing the network energy consumption are important but conflict goals in wireless sensor networks. Challenges arise due to the application-specific computing and communication resources constraints and end-to-end real-time constraints. This paper studies the tradeoff between energy consumption and network performance in Real-Time Wireless Sensor Networks (RTWSN) by investigating the interaction between the network performance optimization and network lifetime maximization problems. We address the tradeoff between these two conflict goals as a joint non-linear optimization problem. Based the solution of the optimization problem, we design an online distributed algorithm to achieve judicious tradeoff based on application-specific focus, while at the same time meeting real-time and resource constraints. Extensive simulation studies illustrate the efficiency and efficacy of the proposed algorithm.