Both alternating current and direct current are measured in amperes. But how is the ampere defined for an alternating current?