Time-constrained data aggregation in wireless sensor networks