The kinds of comments that are useful are less about what the code already tells you is happening, and more things like:
/* we don't use the actual price but the discounted price, as per email from Manager Bob on 2022-09-16 */
subtotal += price * customer_discount_factor;
or
/* note there's a 2ms delay while relays settle; this is subtracted from sample time, so timeout is not what you might expect */
select(0,&readfd,NULL,NULL,&timeout);