An optical sensor configured to reduce a measurement time while the accuracy of the optical sensor is maintained is realized. An initial configuration circuit (19) includes a counter configured to perform counting of the number of pulse outputs from a first light-receiving unit (11) in first to nth regions obtained by dividing each cycle of a reference clock into n equal parts, determines, among the first to nth regions, a region in which a counter value is largest, and the initial configuration circuit causes a first DLL circuit (17) to perform a converging operation to the region determined.