Cast interval values to ints before use, so we don't get sign issues ...

... with time_t.

This one escaped in #659, and I didn't really see a button to reopen a closed issue.