This is the 1976 film or 1977 TV series Logan's Run. The post-apocalyptic inhabitants of a domed city have crystal life clocks embedded in their palms. Whne When they reach 2130 years old (21 in the novel), the clock starts blinking and the must participate in a ritual called 'Carousel' to continue living. In actuality, nobody survives it.