(a) Notwithstanding section 6101 of this title, each agency may establish, in accordance with this subchapter, programs which allow the use of flexible schedules which include—
(1) designated hours and days during which an employee on such a schedule must be present for work; and
(2) designated hours during which an employee on such a schedule may elect the time of such employee's arrival at and departure from work, solely for such purpose or, if and to the extent permitted, for the purpose of accumulating credit hours to reduce the length of the workweek or another workday.
An election by an employee referred to in paragraph (2) shall be subject to limitations generally prescribed to ensure that the duties and requirements of the employee's position are fulfilled.
(b) Notwithstanding any other provision of this subchapter, but subject to the terms of any written agreement referred to in section 6130(a) of this title, if the head of an agency determines that any organization within the agency which is participating in a program under subsection (a) is being substantially disrupted in carrying out its functions or is incurring additional costs because of such participation, such agency head may—
(1) restrict the employees' choice of arrival and departure time,
(2) restrict the use of credit hours, or
(3) exclude from such program any employee or group of employees.