beginning of a timer that takes into account time errors and potential frame skips and self adjusts