I wasn't reading your comment this way. I hadn't clearly stated an analysis to dispute.

> In this way, a delay of 0.0 seconds

Since delay==0 has a special meaning (wait forever), lets talk about D==T. In this case floor(D/T)+2==3 and ceil(D/T)+1==2.

I choose floor()+2 (aka. truncation) in part because I don't know if vxWorks provides ceil(double), which isn't required by C89. Also, if floor()+2 doesn't pass Andrew's test, then ceil()+1 won't either. So the longer delay seems to me the place to test.

> I didn't mean to dispute your anaysis.

I wasn't reading your comment this way. I hadn't clearly stated an analysis to dispute.

> In this way, a delay of 0.0 seconds

Since delay==0 has a special meaning (wait forever), lets talk about D==T. In this case floor(D/T)+2==3 and ceil(D/T)+1==2.

I choose floor()+2 (aka. truncation) in part because I don't know if vxWorks provides ceil(double), which isn't required by C89. Also, if floor()+2 doesn't pass Andrew's test, then ceil()+1 won't either. So the longer delay seems to me the place to test.