At the time of each annual tax levy, the legislative body of the local agency shall direct that from the funds of the local agency an amount equal to 2 percent of the salaries paid to the policemen during the preceding year be paid into the police relief and pension fund, and an amount equal to 2 percent of the salaries paid to the firemen during the preceding year into the firemen’s relief and pension fund.