That is the beauty of binary calculation. If two unsigned long variables are used, and one has rollover, and they are substracted, then the result is still the difference.
But they have to be unsigned long, if one of them is a "long", then it won't work. The variable of the interval however doesn't have to be unsigned long.
There are some test sketches on this forum to test it. I could not find them right now.