Roughly 49 days. But, if you write the code correctly, you needn't worry about the overflow.
Anyone see any problems with that?
The pseudo-code doesn't take into account the time consumed by everything except the delay. Say the rest of loop takes about 1ms and feeding the fish takes about 10ms. Each pass through the loop will be 1001ms instead of the expected 1000ms and each time the fish are feed the total delay will be 1011ms. Assuming I did the math right, after 41 days, the fish feeding will be an hour later than when the application started.
If you're OK with the drift, then the pseudo-code will work. If not, then you'll need to use the technique described here (with a minor correction)...
If the fish dies, my wife will not like me
Let's hope they don't get sick after the automatic feeder goes online!