alto777:
I found this to fix my problem.programming - How can I handle the millis() rollover? - Arduino Stack Exchange
It includes a technique for testing a solution without waiting 56 days.
I have another technique. It is to use micros() rather than millis(). That way, rollover happens within an hour and a quarter.