Here is one example, it is simpler just to reshape the data to long format, then sort based on ID + timestamp and calculate the duration.
*************************************.
DATA LIST FREE /ID START page1 page2 page3 page4 page5 END.
BEGIN DATA
1 0 2 7 4 14 12 14
2 0 4 8 12 14 10 14
END DATA.
DATASET NAME Page.
VARSTOCASES /MAKE Time FROM START TO END
/INDEX Page (Time).
SORT CASES BY ID Time.
SPLIT FILE BY ID.
CREATE Dur = DIFF(Time,1).
SPLIT FILE OFF.
*You could reshape to wide, but probably whatever stats you want are.
*easier in long format, eg.
SORT CASES BY Page.
SPLIT FILE BY Page.
FREQ Dur /FORMAT = NOTABLE /STATISTICS = MIN MAX MEAN STDEV /NTILES = 4 /HISTO.
SPLIT FILE OFF.
*************************************.
Also see the LAG function. (Also above presumes no exact ties, but hopefully with time stamps a no zero durations that is not a problem.)