Alexander Dorofeyev alexd4@inbox.lv writes:
Yeah these calculations are a headache. I could probably write
now < start_time || now >= start_time + dwTimeout
The right way is to write
now - start_time > dwTimeout
using unsigned variables everywhere. Then you don't have to worry about overflows, and you don't even need to special case INFINITE.