Add functions for clock drift compensation.