timeline: when there are no objects anymore, set duration to 0.