A low-power time-domain comparator for iot applications