 Militia service was not a full-time activity, but he frequently served in the field for nearly three years, and was appointed a brigade major.From 1779 to 1814, he was professor of mathematics in the University of Pennsylvania, being also serving as vice provost from 1810 to 1813.In 1805, without solicitation, President Jefferson appointed him director of the mint, which position he held until a short time before his death.