The county clerk or some duly authorized deputy or assistant shall keep the office of the county clerk continuously open for twenty-four hours next after the closing of the polls for any primary, general or statewide special election. The office shall be kept open for the purpose of receiving the ballot boxes, election returns and materials. If all such items have been received from each precinct in the county before the expiration of the twenty-four hour period, the office of the county clerk may be closed except during regular office hours.