Since it is calculated with unsigned long, it works fine unless you have twice or more rollovers.
In other words, you can ignore the rollover unless you try to use a timer that exceeds about 49 days.
The timer basically works by subtracting the "last recorded time" from the "current time"
Record 10,000(0x00002710) and when 5000 has passed and 15,000(0x00003A98)
0x00003A98 - 0x00002710 = 0x00001388 = 5000
Record 4,294,963,200(0xFFFFF000) and when 5000 has passed and 904(0x00000388)
Note: Overflow is occurring.
0x00000388 - 0xFFFFF000 = 0x00001388 = 5000
No problem.