Sub-second periodicity in a fast radio burst