Trying to calculate the time between two tag changes

You might find the techniques in this thread helpful (in spite of the title):