Each sheriff shall receive for the performance of official duties as sheriff an annual salary, which shall be payable monthly, twice per month, or biweekly; provided, that compensation for service in office for a part of a calendar month shall be paid in the proportion that the days served bear to the number of days in that month.