I have logged timestamps from an ADC which are in unit16 format, i.e. the count resets to zero after 65536. How can I easily convert these values into continuous values (i.e. does not return to zero after 65536. This is easy if the ADC only resets to zero once during my application (just add 65336 to each value). However my application does not always run for the same length of time and the count resets to zero many many times during it.