Handling Time-Varying Treatments