A Fully Fledged TDC Implemented in Field-Programmable Gate Arrays