Grumpy_Mike:
The problem with using int and the way of generating the next calling time is that the numbers go negitave for half the time. If you were using an unsigned int and subtracting the current time from the start time and comparing the result to a required time their would be no problem but you are not.Using the method you do would only result in a problem every 40days or so if you used a long, but with an int it is very much shorter. I will leave it a s an exercise for you to work out how long that int is in the negitave region.
(Sorry for the late response)
As I said before, it works just fine when it's in the negative region. The only problem that happens is that it doesn't work for 500 milliseconds every 65 seconds, but all that does is just update the temperature a little bit faster for half a second. I can see how that could be a problem in some applications though.
Anyway, I'm sticking with unsigned long now since that works best.