The science of timekeeping