Time-Varying Network Optimization